diff --git a/build.gradle b/build.gradle index 76d59302b..cdc605db1 100644 --- a/build.gradle +++ b/build.gradle @@ -77,7 +77,7 @@ subprojects { ext.androidToolsBuildGradle = '30.0.3' ext.androidBuildToolsVersion = '30.0.3' - ext.androidMinSdkVersion = 21 + ext.androidMinSdkVersion = 26 ext.androidCompileSdkVersion = 31 ext.androidTargetSdkVersion = 31 ext.androidAnnotationsVersion = '3.0.1' diff --git a/opensrp-anc/build.gradle b/opensrp-anc/build.gradle index 88bcf7a00..8e9720ee8 100644 --- a/opensrp-anc/build.gradle +++ b/opensrp-anc/build.gradle @@ -7,7 +7,8 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' +// classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:7.0.4' classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0' classpath 'com.google.gms:google-services:4.3.14' } @@ -181,7 +182,7 @@ tasks.withType(Test) { dependencies { implementation 'androidx.appcompat:appcompat:1.3.1' - implementation('org.smartregister:opensrp-client-native-form:3.1.1-SNAPSHOT@aar') { + implementation('org.smartregister:opensrp-client-native-form:3.1.2-SNAPSHOT@aar') { transitive = true exclude group: 'com.android.support', module: 'recyclerview-v7' exclude group: 'com.android.support', module: 'appcompat-v7' @@ -229,6 +230,7 @@ dependencies { implementation group: 'org.apache.commons', name: 'commons-text', version: '1.9' implementation 'junit:junit:4.12' implementation 'androidx.test:core:1.4.0' + testImplementation project(path: ':opensrp-anc') annotationProcessor 'com.jakewharton:butterknife:10.2.3' implementation 'net.zetetic:android-database-sqlcipher:4.4.0@aar' implementation 'commons-validator:commons-validator:1.7' diff --git a/opensrp-anc/src/main/assets/config/attention-flags.yml b/opensrp-anc/src/main/assets/config/attention-flags.yml index 80d4f2aca..31a728142 100644 --- a/opensrp-anc/src/main/assets/config/attention-flags.yml +++ b/opensrp-anc/src/main/assets/config/attention-flags.yml @@ -16,34 +16,34 @@ fields: relevance: "!prev_preg_comps.isEmpty() && !prev_preg_comps.contains('none') && !prev_preg_comps.contains('dont_know')" - template: "{{attention_flags.yellow.past_alcohol_substances_used}}: {substances_used_value}" - relevance: "substances_used != null && !substances_used.isEmpty() && (!substances_used.contains('none') && !substances_used.contains('None'))" + relevance: "!substances_used.isEmpty() && !substances_used.contains('none')" - - template: "{{attention_flags.yellow.pre_eclampsia_risk}}" + - template: "{{attention_flags.yellow.pre_eclampsia_risk}}: {{attention_flags.yes}}" relevance: "preeclampsia_risk == 1" - - template: "{{attention_flags.yellow.diabetes_risk}}" + - template: "{{attention_flags.yellow.diabetes_risk}}: {{attention_flags.yes}}" relevance: "gdm_risk == 1" - template: "{{attention_flags.yellow.surgeries}}: {surgeries_value}" relevance: "!surgeries.isEmpty() && !surgeries.contains('none')" - template: "{{attention_flags.yellow.chronic_health_conditions}}: {health_conditions_value}" - relevance: "!health_conditions.isEmpty() && !health_conditions.contains('none') && !health_conditions.contains('None') && !health_conditions.contains('dont_know')" + relevance: "!health_conditions.isEmpty() && !health_conditions.contains('none') && !health_conditions.contains('dont_know')" - - template: "{{attention_flags.yellow.high_daily_consumption_of_caffeine}}" + - template: "{{attention_flags.yellow.high_daily_consumption_of_caffeine}}: {{attention_flags.yes}}" relevance: "!caffeine_intake.isEmpty() && !caffeine_intake.contains('none')" - - template: "{{attention_flags.yellow.second_hand_exposure_to_tobacco_smoke}}" - relevance: "!shs_exposure.isEmpty() && shs_exposure.contains('yes')" + - template: "{{attention_flags.yellow.second_hand_exposure_to_tobacco_smoke}}: {shs_exposure_value}" + relevance: "shs_exposure == 'yes'" - template: "{{attention_flags.yellow.persistent_physiological_symptoms}}: {phys_symptoms_persist_value}" relevance: "!phys_symptoms_persist.isEmpty() && !phys_symptoms_persist.contains('none')" - - template: "{{attention_flags.yellow.reduced_or_no_fetal_movement_perceived_by_woman}}" - relevance: "!mat_percept_fetal_move.isEmpty() && mat_percept_fetal_move.contains('normal_fetal_move')" + - template: "{{attention_flags.yellow.reduced_or_no_fetal_movement_perceived_by_woman}}: {mat_percept_fetal_move_value}" + relevance: "mat_percept_fetal_move != '' && mat_percept_fetal_move != 'normal_fetal_move'" - template: "{{attention_flags.yellow.weight_category}}: {weight_cat_value}" - relevance: "!weight_cat.isEmpty() && (weight_cat.contains('underweight') || weight_cat.contains('Underweight') || weight_cat.contains('overweight') || weight_cat.contains('Overweight') || weight_cat.contains('obese') || weight_cat.contains('Obese'))" + relevance: "weight_cat != '' && (weight_cat == 'underweight' || weight_cat == 'overweight' || weight_cat == 'obese')" - template: "{{attention_flags.yellow.abnormal_breast_exam}}: {breast_exam_abnormal_value}" relevance: "!breast_exam_abnormal.contains('none') && !breast_exam_abnormal.isEmpty()" @@ -54,20 +54,20 @@ fields: - template: "{{attention_flags.yellow.abnormal_pelvic_exam}}: {pelvic_exam_abnormal_value}" relevance: "!pelvic_exam_abnormal.contains('none') && !pelvic_exam_abnormal.isEmpty()" - - template: "{{attention_flags.yellow.oedema_present}}" - relevance: "!oedema.isEmpty() && oedema.contains('yes')" + - template: "{{attention_flags.yellow.oedema_present}}: {oedema_value}" + relevance: "oedema == 'yes'" - - template: "{{attention_flags.yellow.rh_factor_negative}}" - relevance: "!rh_factor.isEmpty() && rh_factor.contains('negative')" + - template: "{{attention_flags.yellow.rh_factor_negative}}: {rh_factor_value}" + relevance: "rh_factor == 'negative'" --- group: red_attention_flag fields: - template: "{{attention_flags.red.danger_sign}}: {danger_signs_value}" - relevance: "!danger_signs.isEmpty() && !danger_signs.contains('none') && !danger_signs.contains('None') && !danger_signs.contains('danger_none')" + relevance: "!danger_signs.isEmpty() && !danger_signs.contains('danger_none')" - - template: "{{attention_flags.red.occupation_informal_employment_sex_worker}}" - relevance: "!occupation.isEmpty() && occupation.contains('informal_employment_sex_worker')" + - template: "{{attention_flags.red.occupation_informal_employment_sex_worker}}: {{attention_flags.yes}}" + relevance: "occupation.contains('informal_employment_sex_worker')" - template: "{{attention_flags.red.no_of_pregnancies_lost_ended}}: {miscarriages_abortions}" relevance: "miscarriages_abortions >= 2" @@ -79,17 +79,16 @@ fields: relevance: "{c_sections} >= 1" - template: "{{attention_flags.red.allergies}}: {allergies_value}" - relevance: "!allergies.isEmpty() && (!allergies.contains('none') || allergies.contains('None'))" + relevance: "!allergies.isEmpty() && !allergies.contains('none')" - - template: "{{attention_flags.red.tobacco_user_or_recently_quit}}" - relevance: "!tobacco_user.isEmpty() && - (tobacco_user.contains('yes') || tobacco_user.contains('Yes') || tobacco_user.contains('recently_quit'))" + - template: "{{attention_flags.red.tobacco_user_or_recently_quit}}: {{attention_flags.yes}}" + relevance: "tobacco_user == 'yes' || tobacco_user == 'recently_quit'" - - template: "{{attention_flags.red.woman_and_her_partner_do_not_use_condoms}}" - relevance: "!condom_use.isEmpty() && (condom_use.contains('no') || condom_use.contains('No'))" + - template: "{{attention_flags.red.woman_and_her_partner_do_not_use_condoms}}: {{attention_flags.yes}}" + relevance: "condom_use == 'no'" - template: "{{attention_flags.red.alcohol_substances_currently_using}}: {alcohol_substance_use_value}" - relevance: "!alcohol_substance_use.isEmpty() && (!alcohol_substance_use.contains('none') && !alcohol_substance_use.contains('None'))" + relevance: "!alcohol_substance_use.isEmpty() && !alcohol_substance_use.contains('none')" - template: "{{attention_flags.red.hypertension_diagnosis}}" relevance: "hypertension == 1" @@ -128,7 +127,7 @@ fields: relevance: "dilation_cm > 2" - template: "{{attention_flags.red.no_fetal_heartbeat_observed}}" - relevance: "fetal_heartbeat.contains('no') && gest_age > 20" + relevance: "fetal_heartbeat == 'no' && gest_age >= 16" - template: "{{attention_flags.red.abnormal_fetal_heart_rate}}: {fetal_heart_rate_repeat}bpm" relevance: "fetal_heart_rate_repeat < 100 || fetal_heart_rate_repeat > 180" @@ -137,39 +136,42 @@ fields: relevance: "no_of_fetuses > 1" - template: "{{attention_flags.red.fetal_presentation}}: {fetal_presentation} " - relevance: "gest_age >= 28 && fetal_presentation.contains('transverse')" + relevance: "gest_age >= 28 && fetal_presentation == 'transverse'" - - template: "{{attention_flags.red.amniotic_fluid}}: {amniotic_fluid}" - relevance: "!amniotic_fluid.isEmpty() && (amniotic_fluid.contains('reduced') || amniotic_fluid.contains('increased'))" + - template: "{{attention_flags.red.amniotic_fluid}}: {{attention_flags.amniotic_fluid.reduced}}" + relevance: "amniotic_fluid == 'reduced'" + + - template: "{{attention_flags.red.amniotic_fluid}}: {{attention_flags.amniotic_fluid.increased}}" + relevance: "amniotic_fluid == 'increased'" - template: "{{attention_flags.red.placenta_location}}: {placenta_location_value}" - relevance: "!placenta_location.isEmpty() && placenta_location.contains('praevia')" + relevance: "placenta_location == 'praevia'" - - template: "{{attention_flags.red.hiv_risk}}" + - template: "{{attention_flags.red.hiv_risk}}: {{attention_flags.yes}}" relevance: "hiv_risk == 1" - - template: "{{attention_flags.red.hiv_positive}}" + - template: "{{attention_flags.red.hiv_positive}}: {{attention_flags.yes}}" relevance: "hiv_positive == 1" - - template: "{{attention_flags.red.hepatitis_b_positive}}" + - template: "{{attention_flags.red.hepatitis_b_positive}}: {{attention_flags.yes}}" relevance: "hepb_positive == 1" - - template: "{{attention_flags.red.hepatitis_c_positive}}" + - template: "{{attention_flags.red.hepatitis_c_positive}}: {{attention_flags.yes}}" relevance: "hepc_positive == 1" - - template: "{{attention_flags.red.syphilis_positive}}" + - template: "{{attention_flags.red.syphilis_positive}}: {{attention_flags.yes}}" relevance: "syphilis_positive == 1" - - template: "{{attention_flags.red.asymptomatic_bacteriuria_asb_diagnosis}}" + - template: "{{attention_flags.red.asymptomatic_bacteriuria_asb_diagnosis}}: {{attention_flags.yes}}" relevance: "asb_positive == 1" - - template: "{{attention_flags.red.group_b_streptococcus_gbs_diagnosis}}" - relevance: "!urine_culture.isEmpty() && (urine_culture.contains('positive - group b streptococcus (gbs)') || urine_culture.contains('positive_gbs'))" + - template: "{{attention_flags.red.group_b_streptococcus_gbs_diagnosis}}: {{attention_flags.yes}}" + relevance: "urine_culture == 'positive - group b streptococcus (gbs)'" - - template: "{{attention_flags.red.gestational_diabetes_mellitus_gdm_diagnosis}}" + - template: "{{attention_flags.red.gestational_diabetes_mellitus_gdm_diagnosis}}: {{attention_flags.yes}}" relevance: "gdm == 1" - - template: "{{attention_flags.red.diabetes_mellitus_dm_in_pregnancy_diagnosis}}" + - template: "{{attention_flags.red.diabetes_mellitus_dm_in_pregnancy_diagnosis}}: {{attention_flags.yes}}" relevance: "dm_in_preg == 1" - template: "{{attention_flags.red.hematocrit_ht}}: {ht}" @@ -182,4 +184,4 @@ fields: relevance: "platelets < 100000" - template: "{{attention_flags.red.tb_screening_positive}}" - relevance: "!tb_screening_result.isEmpty() && tb_screening_result.contains('positive')" + relevance: "tb_screening_result == 'positive'" diff --git a/opensrp-anc/src/main/assets/config/contact-globals.yml b/opensrp-anc/src/main/assets/config/contact-globals.yml index 5d501794c..83390ef45 100644 --- a/opensrp-anc/src/main/assets/config/contact-globals.yml +++ b/opensrp-anc/src/main/assets/config/contact-globals.yml @@ -1,6 +1,11 @@ --- +form: anc_quick_check +fields: + - "entity_id" +--- form: anc_counselling_treatment fields: + - "visit_date" - "hepc_positive" - "danger_signs" - "danger_signs_value" @@ -122,6 +127,7 @@ fields: --- form: anc_profile fields: + - "visit_date" - "contact_no" - "no_of_fetuses" - "bmi" diff --git a/opensrp-anc/src/main/assets/config/contact-summary.yml b/opensrp-anc/src/main/assets/config/contact-summary.yml index 33128a513..4ebb58561 100644 --- a/opensrp-anc/src/main/assets/config/contact-summary.yml +++ b/opensrp-anc/src/main/assets/config/contact-summary.yml @@ -3,171 +3,171 @@ properties_file_name: "contact_summary" group: hospital_referral fields: - template: "{{contact_summary.hospital_referral.woman_referred_to_hospital}}" - relevance: "referred_hosp == 'yes'" + relevance: "referred_hosp_value == 'yes'" - - template: "{{contact_summary.hospital_referral.woman_not_referred_to_hospital}}: {referred_hosp_notdone_value}" - relevance: "referred_hosp == 'no'" + - template: "{{contact_summary.hospital_referral.woman_not_referred_to_hospital}}: {referred_hosp_notdone}" + relevance: "referred_hosp_value == 'no'" - - template: "{{contact_summary.hospital_referral.danger_signs}}: {danger_signs_value}" - relevance: "!danger_signs.isEmpty() && !danger_signs.contains('danger_none')" + - template: "{{contact_summary.hospital_referral.danger_signs}}: {danger_signs}" + relevance: "!danger_signs_value.isEmpty() && !danger_signs_value.contains('danger_none')" - template: "{{contact_summary.hospital_referral.severe_hypertension}}: {bp_systolic_repeat}/{bp_diastolic_repeat} mmHg" - relevance: "severe_hypertension == 1" + relevance: "severe_hypertension_value == 1" - template: "{{contact_summary.hospital_referral.hypertension_and_symptom_of_severe_pre_eclampsia}}: {symp_sev_preeclampsia_value}" - relevance: "hypertension == 1 && symp_sev_preeclampsia != '' && !symp_sev_preeclampsia.contains('none')" + relevance: "hypertension_value == 1 && symp_sev_preeclampsia_value != '' && !symp_sev_preeclampsia_value.contains('none')" - template: "{{contact_summary.hospital_referral.pre_eclampsia_diagnosis}}" - relevance: "preeclampsia == 1" + relevance: "preeclampsia_value == 1" - template: "{{contact_summary.hospital_referral.severe_pre_eclampsia_diagnosis}}" - relevance: "severe_preeclampsia == 1" + relevance: "severe_preeclampsia_value == 1" - template: "{{contact_summary.hospital_referral.fever}}: {body_temp_repeat}ºC" - relevance: "body_temp_repeat >= 38" + relevance: "body_temp_repeat_value >= 38" - template: "{{contact_summary.hospital_referral.abnormal_pulse_rate}}: {pulse_rate_repeat}bpm" - relevance: "pulse_rate_repeat < 60 || pulse_rate_repeat > 100" + relevance: "pulse_rate_repeat_value < 60 || pulse_rate_repeat_value > 100" - - template: "{{contact_summary.hospital_referral.respiratory_distress}}: {respiratory_exam_abnormal_value}" - relevance: "!respiratory_exam_abnormal.contains('none') && !respiratory_exam_abnormal.isEmpty()" + - template: "{{contact_summary.hospital_referral.respiratory_distress}}: {respiratory_exam_abnormal}" + relevance: "!respiratory_exam_abnormal_value.contains('none') && !respiratory_exam_abnormal_value.isEmpty()" - template: "{{contact_summary.hospital_referral.low_oximetry}}: {oximetry}%" - relevance: "oximetry < 92" + relevance: "oximetry_value < 92" - - template: "{{contact_summary.hospital_referral.abnormal_cardiac_exam}}: {cardiac_exam_abnormal_value}" - relevance: "!cardiac_exam_abnormal.contains('none') && !cardiac_exam_abnormal.isEmpty()" + - template: "{{contact_summary.hospital_referral.abnormal_cardiac_exam}}: {cardiac_exam_abnormal}" + relevance: "!cardiac_exam_abnormal_value.contains('none') && !cardiac_exam_abnormal_value.isEmpty()" - - template: "{{contact_summary.hospital_referral.abnormal_breast_exam}}: {breast_exam_abnormal_value}" - relevance: "!breast_exam_abnormal.contains('none') && !breast_exam_abnormal.isEmpty()" + - template: "{{contact_summary.hospital_referral.abnormal_breast_exam}}: {breast_exam_abnormal}" + relevance: "!breast_exam_abnormal_value.contains('none') && !breast_exam_abnormal_value.isEmpty()" - - template: "{{contact_summary.hospital_referral.abnormal_abdominal_exam}}: {abdominal_exam_abnormal_value}" - relevance: "!abdominal_exam_abnormal.contains('none') && !abdominal_exam_abnormal.isEmpty()" + - template: "{{contact_summary.hospital_referral.abnormal_abdominal_exam}}: {abdominal_exam_abnormal}" + relevance: "!abdominal_exam_abnormal_value.contains('none') && !abdominal_exam_abnormal_value.isEmpty()" - - template: "{{contact_summary.hospital_referral.abnormal_pelvic_exam}}: {pelvic_exam_abnormal_value}" - relevance: "!pelvic_exam_abnormal.contains('none') && !pelvic_exam_abnormal.isEmpty()" + - template: "{{contact_summary.hospital_referral.abnormal_pelvic_exam}}: {pelvic_exam_abnormal}" + relevance: "!pelvic_exam_abnormal_value.contains('none') && !pelvic_exam_abnormal_value.isEmpty()" - template: "{{contact_summary.hospital_referral.no_fetal_heartbeat_observed}}" - relevance: "fetal_heartbeat == 'no'" + relevance: "fetal_heartbeat_value == 'no'" - template: "{{contact_summary.hospital_referral.abnormal_fetal_heart_rate}}: {fetal_heart_rate_repeat}bpm" - relevance: "fetal_heart_rate_repeat < 100 || fetal_heart_rate_repeat > 180" + relevance: "fetal_heart_rate_repeat_value < 100 || fetal_heart_rate_repeat_value > 180" --- group: reason_for_visit fields: - - template: "{{contact_summary.reason_for_visit.reason_for_coming_to_facility}}: {contact_reason_value}" + - template: "{{contact_summary.reason_for_visit.reason_for_coming_to_facility}}: {contact_reason}" relevance: "contact_reason_value != ''" - - template: "{{contact_summary.reason_for_visit.health_complaint}}: {specific_complaint_value}" + - template: "{{contact_summary.reason_for_visit.health_complaint}}: {specific_complaint}" relevance: "specific_complaint_value != ''" --- group: demographic_info fields: - - template: "{{contact_summary.demographic_info.educ_level}}: {educ_level_value}" + - template: "{{contact_summary.demographic_info.educ_level}}: {educ_level}" relevance: "educ_level_value != ''" - - template: "{{contact_summary.demographic_info.marital_status}}: {marital_status_value}" + - template: "{{contact_summary.demographic_info.marital_status}}: {marital_status}" relevance: "marital_status_value != ''" - - template: "{{contact_summary.demographic_info.occupation}}: {occupation_value}" + - template: "{{contact_summary.demographic_info.occupation}}: {occupation}" relevance: "occupation_value != ''" --- group: current_pregnancy fields: - template: "{{contact_summary.current_pregnancy.ga}}: {gest_age}" - relevance: "gest_age !='' " + relevance: "gest_age_value !='' " - template: "{{contact_summary.current_pregnancy.edd}}: {edd}" - relevance: "edd != '' " + relevance: "edd_value != '' " - template: "{{contact_summary.current_pregnancy.ultrasound_date}}: {ultrasound_date}" - relevance: "ultrasound_date != ''" + relevance: "ultrasound_date_value != ''" - template: "{{contact_summary.current_pregnancy.no_of_fetuses}}: {no_of_fetuses}" - relevance: "no_of_fetuses != ''" + relevance: "no_of_fetuses_value != ''" - - template: "{{contact_summary.current_pregnancy.fetal_presentation}}: {fetal_presentation_value}" - relevance: "fetal_presentation != ''" + - template: "{{contact_summary.current_pregnancy.fetal_presentation}}: {fetal_presentation}" + relevance: "fetal_presentation_value != ''" - - template: "{{contact_summary.current_pregnancy.amniotic_fluid}}: {amniotic_fluid_value}" - relevance: "amniotic_fluid != ''" + - template: "{{contact_summary.current_pregnancy.amniotic_fluid}}: {amniotic_fluid}" + relevance: "amniotic_fluid_value != ''" - - template: "{{contact_summary.current_pregnancy.placenta_location}}: {placenta_location_value}" - relevance: "placenta_location != ''" + - template: "{{contact_summary.current_pregnancy.placenta_location}}: {placenta_location}" + relevance: "placenta_location_value != ''" --- group: obstetric_history fields: - template: "{{contact_summary.obstetric_history.gravida}} = {gravida}, {{contact_summary.obstetric_history.parity}} = {parity}" - relevance: "gravida !='' || parity != ''" + relevance: "gravida_value !='' || parity_value != ''" - template: "{{contact_summary.obstetric_history.no_of_pregnancies_lost_ended}}: {miscarriages_abortions}" - relevance: "miscarriages_abortions > 0" + relevance: "miscarriages_abortions_value > 0" - template: "{{contact_summary.obstetric_history.no_of_live_births}}: {live_births}" - relevance: "live_births > 0" + relevance: "live_births_value > 0" - template: "{{contact_summary.obstetric_history.no_of_stillbirths}}: {stillbirths}" - relevance: "stillbirths > 0" + relevance: "stillbirths_value > 0" - template: "{{contact_summary.obstetric_history.no_of_c_sections}}: {c_sections}" - relevance: "c_sections > 0" + relevance: "c_sections_value > 0" - - template: "{{contact_summary.obstetric_history.past_pregnancy_problems}}: {prev_preg_comps_value}" - relevance: "(!prev_preg_comps.contains('dont_know') || !prev_preg_comps.contains('none'))" + - template: "{{contact_summary.obstetric_history.past_pregnancy_problems}}: {prev_preg_comps}" + relevance: "(!prev_preg_comps_value.contains('dont_know') || !prev_preg_comps_value.contains('none'))" - template: "{{contact_summary.obstetric_history.past_substances_used}}: {substances_used_value}" - relevance: "(!substances_used.isEmpty()) " + relevance: "(!substances_used_value.isEmpty()) " --- group: medical_history fields: - - template: "{{contact_summary.medical_history.allergies}}: {allergies_value}" - relevance: "!allergies.isEmpty()" + - template: "{{contact_summary.medical_history.allergies}}: {allergies}" + relevance: "!allergies_value.isEmpty()" - - template: "{{contact_summary.medical_history.surgeries}}: {surgeries_value}" - relevance: "!surgeries.isEmpty()" + - template: "{{contact_summary.medical_history.surgeries}}: {surgeries}" + relevance: "!surgeries_value.isEmpty()" - - template: "{{contact_summary.medical_history.chronic_health_conditions}}: {health_conditions_value}" - relevance: "!health_conditions.isEmpty()" + - template: "{{contact_summary.medical_history.chronic_health_conditions}}: {health_conditions}" + relevance: "!health_conditions_value.isEmpty()" - template: "{{contact_summary.medical_history.hiv_diagnosis_date}}: {hiv_diagnosis_date}" - relevance: "hiv_diagnosis_date != ''" + relevance: "hiv_diagnosis_date_value != ''" - template: "{{contact_summary.medical_history.hiv_diagnosis_date_unknown}}" - relevance: "hiv_diagnosis_date_unknown.contains('yes') " + relevance: "hiv_diagnosis_date_unknown_value.contains('yes') " --- group: immunisation_status fields: - - template: "{{contact_summary.immunisation_status.tt_immunisation_status}}: {tt_immun_status_value}" + - template: "{{contact_summary.immunisation_status.tt_immunisation_status}}: {tt_immun_status}" relevance: "tt_immun_status_value != ''" - template: "{{contact_summary.immunisation_status.tt_dose_1}}: {tt1_date_done_date_today_hidden} {tt1_date_done}" - relevance: "tt1_date == 'done_today' || tt1_date == 'done_earlier'" + relevance: "tt1_date_value == 'done_today' || tt1_date_value == 'done_earlier'" - template: "{{contact_summary.immunisation_status.tt_dose_2}}:{tt2_date_done_date_today_hidden} {tt2_date_done}" - relevance: "tt2_date == 'done_today' || tt2_date == 'done_earlier'" + relevance: "tt2_date_value == 'done_today' || tt2_date_value == 'done_earlier'" - - template: "{{contact_summary.immunisation_status.tt_dose_not_given}}: {tt_dose_notdone_value}" - relevance: "tt1_date == 'not_done' || tt2_date == 'not_done'" + - template: "{{contact_summary.immunisation_status.tt_dose_not_given}}: {tt_dose_notdone}" + relevance: "tt1_date_value == 'not_done' || tt2_date_value == 'not_done'" - - template: "{{contact_summary.immunisation_status.flu_immunisation_status}}: {flu_immun_status_value}" + - template: "{{contact_summary.immunisation_status.flu_immunisation_status}}: {flu_immun_status}" relevance: "flu_immun_status_value != ''" - - template: "{{contact_summary.immunisation_status.flu_dose}}: {flu_date_done}" - relevance: "flu_date == 'done_today' || flu_date == 'done_earlier'" + - template: "{{contact_summary.immunisation_status.flu_dose}}: {flu_date}" + relevance: "flu_date_value == 'done_today' || flu_date_value == 'done_earlier'" - - template: "{{contact_summary.immunisation_status.flu_dose_not_given}}: {flu_dose_notdone_value}" - relevance: "flu_date == 'not_done'" + - template: "{{contact_summary.immunisation_status.flu_dose_not_given}}: {flu_dose_notdone}" + relevance: "flu_date_value == 'not_done'" --- group: medications fields: - - template: "{{contact_summary.medications.current_medications}}: {medications_value}" + - template: "{{contact_summary.medications.current_medications}}: {medications}" relevance: "!medications_value.isEmpty()" - template: "{{contact_summary.medications.medications_prescribed}}: {vita}, {alben_meben}, {mag_calc}, {nausea_pharma}, {antacid}, {penicillin}, {antibiotic}, {prep}, {sp}, {ifa}, {ifa_medication}, {aspirin}, {calcium}" @@ -175,208 +175,208 @@ fields: isMultiWidget: true - template: "{{contact_summary.medications.calcium_compliance}}: {calcium_comply}" - relevance: "calcium_comply != ''" + relevance: "calcium_comply_value != ''" - template: "{{contact_summary.medications.calcium_side_effects}}: {calcium_effects}" - relevance: "calcium_effects != ''" + relevance: "calcium_effects_value != ''" - template: "{{contact_summary.medications.ifa_compliance}}: {ifa_comply}" - relevance: "ifa_comply != ''" + relevance: "ifa_comply_value != ''" - template: "{{contact_summary.medications.ifa_side_effects}}: {ifa_effects}" - relevance: "ifa_effects != ''" + relevance: "ifa_effects_value != ''" - template: "{{contact_summary.medications.aspirin_compliance}}: {aspirin_comply}" - relevance: "aspirin_comply != ''" + relevance: "aspirin_comply_value != ''" - template: "{{contact_summary.medications.vitamin_a_compliance}}: {vita_comply}" - relevance: "vita_comply != ''" + relevance: "vita_comply_value != ''" - template: "{{contact_summary.medications.penicillin_compliance}}: {penicillin_comply}" - relevance: "penicillin_comply != ''" + relevance: "penicillin_comply_value != ''" --- -group: woman's_behaviour +group: womans_behaviour fields: - - template: "{{contact_summary.woman_behaviour.persisting_behaviours}}: {behaviour_persist_value}" - relevance: "behaviour_persist != ''" + - template: "{{contact_summary.woman_behaviour.persisting_behaviours}}: {behaviour_persist}" + relevance: "behaviour_persist_value != ''" - - template: "{{contact_summary.woman_behaviour.caffeine_intake}}: {caffeine_intake_value}" - relevance: "caffeine_intake != ''" + - template: "{{contact_summary.woman_behaviour.caffeine_intake}}: {caffeine_intake}" + relevance: "caffeine_intake_value != ''" - - template: "{{contact_summary.woman_behaviour.caffeine_reduction_counseling}}: {caffeine_counsel_value}" - relevance: "caffeine_counsel == 'done'" + - template: "{{contact_summary.woman_behaviour.caffeine_reduction_counseling}}: {caffeine_counsel}" + relevance: "caffeine_counsel_value == 'done'" - - template: "{{contact_summary.woman_behaviour.caffeine_reduction_not_counseling}}: {caffeine_counsel_notdone_value}" - relevance: "caffeine_counsel == 'not_done'" + - template: "{{contact_summary.woman_behaviour.caffeine_reduction_not_counseling}}: {caffeine_counsel_notdone}" + relevance: "caffeine_counsel_value == 'not_done'" - - template: "{{contact_summary.woman_behaviour.tobacco_user}}: {tobacco_user_value}" - relevance: "tobacco_user != ''" + - template: "{{contact_summary.woman_behaviour.tobacco_user}}: {tobacco_user}" + relevance: "tobacco_user_value != ''" - template: "{{contact_summary.woman_behaviour.tobacco_cessation_counseling_done}}" - relevance: "tobacco_counsel == 'done'" + relevance: "tobacco_counsel_value == 'done'" - - template: "{{contact_summary.woman_behaviour.tobacco_cessation_counseling_done}}: {tobacco_counsel_notdone_value}" - relevance: "tobacco_counsel == 'not_done'" + - template: "{{contact_summary.woman_behaviour.tobacco_cessation_counseling_done}}: {tobacco_counsel_notdone}" + relevance: "tobacco_counsel_value == 'not_done'" - - template: "{{contact_summary.woman_behaviour.shs_exposure}}: {shs_exposure_value}" - relevance: "shs_exposure != ''" + - template: "{{contact_summary.woman_behaviour.shs_exposure}}: {shs_exposure}" + relevance: "shs_exposure_value != ''" - template: "{{contact_summary.woman_behaviour.shs_counseling_done}}" - relevance: "shs_counsel == 'done'" + relevance: "shs_counsel_value == 'done'" - - template: "{{contact_summary.woman_behaviour.shs_counseling_not_done}}: {shs_counsel_notdone_value}" - relevance: "shs_counsel == 'not_done'" + - template: "{{contact_summary.woman_behaviour.shs_counseling_not_done}}: {shs_counsel_notdone}" + relevance: "shs_counsel_value == 'not_done'" - - template: "{{contact_summary.woman_behaviour.condom_use}}: {condom_use_value}" - relevance: "condom_use != ''" + - template: "{{contact_summary.woman_behaviour.condom_use}}: {condom_use}" + relevance: "condom_use_value != ''" - template: "{{contact_summary.woman_behaviour.condom_counseling_done}}" - relevance: "condom_counsel == 'done'" + relevance: "condom_counsel_value == 'done'" - - template: "{{contact_summary.woman_behaviour.condom_counseling_not_done}}: {condom_counsel_notdone_value}" - relevance: "condom_counsel == 'not_done'" + - template: "{{contact_summary.woman_behaviour.condom_counseling_not_done}}: {condom_counsel_notdone}" + relevance: "condom_counsel_value == 'not_done'" - - template: "{{contact_summary.woman_behaviour.alcohol_substance_enquiry}}: {alcohol_substance_enquiry_value}" - relevance: "alcohol_substance_enquiry != ''" + - template: "{{contact_summary.woman_behaviour.alcohol_substance_enquiry}}: {alcohol_substance_enquiry}" + relevance: "alcohol_substance_enquiry_value != ''" - template: "{{contact_summary.woman_behaviour.alcohol_substances_used}}: {alcohol_substance_use_value}, {other_substance_use}" - relevance: "alcohol_substance_use != ''" + relevance: "alcohol_substance_use_value != ''" - template: "{{contact_summary.woman_behaviour.alcohol_substances_use_counseling_done}}" - relevance: "alcohol_substance_counsel == 'done'" + relevance: "alcohol_substance_counsel_value == 'done'" - - template: "{{contact_summary.woman_behaviour.alcohol_substances_use_counseling_not_done}}: {alcohol_substance_counsel_notdone_value}" - relevance: "alcohol_substance_counsel == 'not_done'" + - template: "{{contact_summary.woman_behaviour.alcohol_substances_use_counseling_not_done}}: {alcohol_substance_counsel_notdone}" + relevance: "alcohol_substance_counsel_value == 'not_done'" --- group: physiological_symptoms fields: - - template: "{{contact_summary.physiological_symptoms.persisting_physiological_symptoms}}: {phys_symptoms_persist_value}" - relevance: "phys_symptoms_persist != ''" + - template: "{{contact_summary.physiological_symptoms.persisting_physiological_symptoms}}: {phys_symptoms_persist}" + relevance: "phys_symptoms_persist_value != ''" - - template: "{{contact_summary.physiological_symptoms.physiological_symptoms}}: {phys_symptoms_value}" - relevance: "phys_symptoms != ''" + - template: "{{contact_summary.physiological_symptoms.physiological_symptoms}}: {phys_symptoms}" + relevance: "phys_symptoms_value != ''" - - template: "{{contact_summary.physiological_symptoms.low_back_and_pelvic_pain_other_symptoms}}: {other_sym_lbpp_value}" - relevance: "other_sym_lbpp != ''" + - template: "{{contact_summary.physiological_symptoms.low_back_and_pelvic_pain_other_symptoms}}: {other_sym_lbpp}" + relevance: "other_sym_lbpp_value != ''" - - template: "{{contact_summary.physiological_symptoms.varicose_veins_or_oedema_other_symptoms}}: {other_sym_vvo_value}" - relevance: "other_sym_vvo != ''" + - template: "{{contact_summary.physiological_symptoms.varicose_veins_or_oedema_other_symptoms}}: {other_sym_vvo}" + relevance: "other_sym_vvo_value != ''" - template: "{{contact_summary.physiological_symptoms.non_pharma_nausea_and_vomiting_counseling_done}}" - relevance: "nausea_counsel == 'done'" + relevance: "nausea_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.non_pharma_nausea_and_vomiting_counseling_not_done}}: {nausea_counsel_notdone_value}" - relevance: "nausea_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.non_pharma_nausea_and_vomiting_counseling_not_done}}: {nausea_counsel_notdone}" + relevance: "nausea_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.pharma_nausea_and_vomiting_counseling_done}}" - relevance: "nausea_not_relieved_counsel == 'done'" + relevance: "nausea_not_relieved_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.pharma_nausea_and_vomiting_counseling_not_done}}: {nausea_not_relieved_counsel_notdone_value}" - relevance: "nausea_not_relieved_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.pharma_nausea_and_vomiting_counseling_not_done}}: {nausea_not_relieved_counsel_notdone}" + relevance: "nausea_not_relieved_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.diet_heartburn_counseling_done}}" - relevance: "heartburn_counsel == 'done'" + relevance: "heartburn_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.diet_heartburn_counseling_not_done}}: {heartburn_counsel_notdone_value}" - relevance: "heartburn_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.diet_heartburn_counseling_not_done}}: {heartburn_counsel_notdone}" + relevance: "heartburn_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.antacid_heartburn_counseling_done}}" - relevance: "heartburn_not_relieved_counsel == 'done'" + relevance: "heartburn_not_relieved_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.antacid_heartburn_counseling_not_done}}: {heartburn_not_relieved_counsel_notdone_value}" - relevance: "heartburn_not_relieved_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.antacid_heartburn_counseling_not_done}}: {heartburn_not_relieved_counsel_notdone}" + relevance: "heartburn_not_relieved_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.no_pharma_legs_cramps_counseling_done}}" - relevance: "leg_cramp_counsel == 'done'" + relevance: "leg_cramp_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.no_pharma_legs_cramps_counseling_not_done}}: {leg_cramp_counsel_notdone_value}" - relevance: "leg_cramp_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.no_pharma_legs_cramps_counseling_not_done}}: {leg_cramp_counsel_notdone}" + relevance: "leg_cramp_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.calcium_legs_cramps_counseling_done}}" - relevance: "leg_cramp_not_relieved_counsel == 'done'" + relevance: "leg_cramp_not_relieved_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.calcium_legs_cramps_counseling_not_done}}: {leg_cramp_not_relieved_counsel_notdone_value}" - relevance: "leg_cramp_not_relieved_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.calcium_legs_cramps_counseling_not_done}}: {leg_cramp_not_relieved_counsel_notdone}" + relevance: "leg_cramp_not_relieved_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.dietary_modifications_counseling_done}}" - relevance: "constipation_counsel == 'done'" + relevance: "constipation_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.dietary_modifications_counseling_not_done}}: {constipation_counsel_notdone_value}" - relevance: "constipation_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.dietary_modifications_counseling_not_done}}: {constipation_counsel_notdone}" + relevance: "constipation_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.fiber_relieve_constipation_counseling_done}}" - relevance: "constipation_not_relieved_counsel == 'done'" + relevance: "constipation_not_relieved_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.fiber_relieve_constipation_counseling_not_done}}: {constipation_not_relieved_counsel_notdone_value}" - relevance: "constipation_not_relieved_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.fiber_relieve_constipation_counseling_not_done}}: {constipation_not_relieved_counsel_notdone}" + relevance: "constipation_not_relieved_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.regular_low_back_pelvic_pain_counseling_done}}" - relevance: "back_pelvic_pain_counsel == 'done'" + relevance: "back_pelvic_pain_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.regular_low_back_pelvic_pain_counseling_not_done}}: {back_pelvic_pain_counsel_notdone_value}" - relevance: "back_pelvic_pain_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.regular_low_back_pelvic_pain_counseling_not_done}}: {back_pelvic_pain_counsel_notdone}" + relevance: "back_pelvic_pain_counsel_value == 'not_done'" - template: "{{contact_summary.physiological_symptoms.pharma_oedema_counseling_done}}" - relevance: "varicose_oedema_counsel == 'done'" + relevance: "varicose_oedema_counsel_value == 'done'" - - template: "{{contact_summary.physiological_symptoms.pharma_oedema_counseling_not_done}}: {varicose_oedema_counsel_notdone_value}" - relevance: "varicose_oedema_counsel == 'not_done'" + - template: "{{contact_summary.physiological_symptoms.pharma_oedema_counseling_not_done}}: {varicose_oedema_counsel_notdone}" + relevance: "varicose_oedema_counsel_value == 'not_done'" - - template: "{{contact_summary.physiological_symptoms.other_persisting_symptoms}}: {other_symptoms_persist_value}" - relevance: "other_symptoms_persist != ''" + - template: "{{contact_summary.physiological_symptoms.other_persisting_symptoms}}: {other_symptoms_persist}" + relevance: "other_symptoms_persist_value != ''" - - template: "{{contact_summary.physiological_symptoms.other_symptoms}}: {other_symptoms_value}" - relevance: "other_symptoms != ''" + - template: "{{contact_summary.physiological_symptoms.other_symptoms}}: {other_symptoms}" + relevance: "other_symptoms_value != ''" - - template: "{{contact_summary.physiological_symptoms.fetal_movement_felt_by_woman}}: {mat_percept_fetal_move_value}" - relevance: "mat_percept_fetal_move != ''" + - template: "{{contact_summary.physiological_symptoms.fetal_movement_felt_by_woman}}: {mat_percept_fetal_move}" + relevance: "mat_percept_fetal_move_value != ''" --- group: height_and_weight fields: - template: "{{contact_summary.height_and_weight.height}}: {height} cm" - relevance: "height != ''" + relevance: "height_value != ''" - template: "{{contact_summary.height_and_weight.pre_gestational_weight}}: {first_weight} kg" - relevance: "first_weight != ''" + relevance: "first_weight_value != ''" - template: "{{contact_summary.height_and_weight.bmi}} = {bmi}" - relevance: "bmi != ''" + relevance: "bmi_value != ''" - template: "{{contact_summary.height_and_weight.weight_category}}: {weight_cat}" - relevance: "weight_cat !=''" + relevance: "weight_cat_value !=''" - template: "{{contact_summary.height_and_weight.weight_gain_during_pregnancy}}: {exp_weight_gain}" - relevance: "exp_weight_gain != ''" + relevance: "exp_weight_gain_value != ''" - template: "{{contact_summary.height_and_weight.current_weight}}: {current_weight} kg" - relevance: "current_weight != ''" + relevance: "current_weight_value != ''" - template: "{{contact_summary.height_and_weight.weight_gain_per_last_contact}}: {weight_gain} kg" - relevance: "weight_gain != ''" + relevance: "weight_gain_value != ''" - template: "{{contact_summary.height_and_weight.total_weight_pregnancy}}: {tot_weight_gain} kg" - relevance: "tot_weight_gain != ''" + relevance: "tot_weight_gain_value != ''" - template: "{{contact_summary.height_and_weight.health_eating_counseling_done}}" - relevance: "eat_exercise_counsel == 'done'" + relevance: "eat_exercise_counsel_value == 'done'" - - template: "{{contact_summary.height_and_weight.health_eating_counseling_not_done}}: {eat_exercise_counsel_notdone_value}" - relevance: "eat_exercise_counsel == 'not_done'" + - template: "{{contact_summary.height_and_weight.health_eating_counseling_not_done}}: {eat_exercise_counsel}" + relevance: "eat_exercise_counsel_value == 'not_done'" - template: "{{contact_summary.height_and_weight.daily_energy_protein_counseling_done}}" - relevance: "increase_energy_counsel == 'done'" + relevance: "increase_energy_counsel_value == 'done'" - - template: "{{contact_summary.height_and_weight.daily_energy_protein_counseling_not_done}}: {increase_energy_counsel_notdone_value}" - relevance: "increase_energy_counsel == 'not_done'" + - template: "{{contact_summary.height_and_weight.daily_energy_protein_counseling_not_done}}: {increase_energy_counsel}" + relevance: "increase_energy_counsel_value == 'not_done'" - template: "{{contact_summary.height_and_weight.balanced_protein_dietary_counseling_done}}" - relevance: "balanced_energy_counsel == 'done'" + relevance: "balanced_energy_counsel_value == 'done'" - - template: "{{contact_summary.height_and_weight.balanced_protein_dietary_counseling_not_done}}: {balanced_energy_counsel_notdone_value}" - relevance: "balanced_energy_counsel == 'not_done'" + - template: "{{contact_summary.height_and_weight.balanced_protein_dietary_counseling_not_done}}: {balanced_energy_counsel}" + relevance: "balanced_energy_counsel_value == 'not_done'" --- group: blood_pressure fields: @@ -798,7 +798,7 @@ fields: - template: "{{contact_summary.other_tests.other_test_result}}: {other_test_result}" relevance: "other_test_result != ''" --- -group: pre-eclampsia_risk +group: pre_eclampsia_risk fields: - template: "{{contact_summary.pre_eclampsia_risk.asprin_till_deliver_prescribed}}" @@ -876,8 +876,8 @@ fields: group: birth_plan_counseling fields: - - template: "{{contact_summary.birth_plan_counseling.planned_birth_place}}: {delivery_place_value}" - relevance: "delivery_place != ''" + - template: "{{contact_summary.birth_plan_counseling.planned_birth_place}}: {delivery_place}" + relevance: "delivery_place_value != ''" - template: "{{contact_summary.birth_plan_counseling.birth_preparedness_counseling_done}}" relevance: "birth_prep_counsel == 'done'" diff --git a/opensrp-anc/src/main/assets/config/profile-overview.yml b/opensrp-anc/src/main/assets/config/profile-overview.yml index 48bca0622..5828834eb 100644 --- a/opensrp-anc/src/main/assets/config/profile-overview.yml +++ b/opensrp-anc/src/main/assets/config/profile-overview.yml @@ -6,7 +6,13 @@ fields: - template: "{{profile_overview.overview_of_pregnancy.demographic_info.occupation}}: {occupation_value}" relevance: "occupation.contains('informal_employment_sex_worker')" isRedFont: "true" - +--- +sub_group: visit_details +fields: + - template: "{{profile_overview.overview_of_pregnancy.current_pregnancy.visit_date}}: {visit_date}" + relevance: "visit_date != ''" + - template: "{{profile_overview.overview_of_pregnancy.current_pregnancy.contact_date}}: {contact_date}" + relevance: "contact_date != ''" --- sub_group: current_pregnancy fields: @@ -33,7 +39,6 @@ fields: - template: "{{profile_overview.overview_of_pregnancy.current_pregnancy.placenta_location}}: {placenta_location}" relevance: "placenta_location != ''" isRedFont: "placenta_location.contains('Previa')" - --- sub_group: obstetric_history fields: diff --git a/opensrp-anc/src/main/assets/ec_client_fields.json b/opensrp-anc/src/main/assets/ec_client_fields.json index e6cc6e745..a2752233d 100644 --- a/opensrp-anc/src/main/assets/ec_client_fields.json +++ b/opensrp-anc/src/main/assets/ec_client_fields.json @@ -1,233 +1,289 @@ -{ - "bindobjects": [ - { - "name": "ec_mother_details", - "columns": [ - { - "column_name": "base_entity_id", - "type": "Client", - "json_mapping": { - "field": "baseEntityId" - } - }, - { - "column_name": "phone_number", - "type": "Client", - "json_mapping": { - "field": "attributes.phone_number" - } - }, - { - "column_name": "alt_name", - "type": "Event", - "json_mapping": { - "field": "attributes.alt_name" - } - }, - { - "column_name": "alt_phone_number", - "type": "Client", - "json_mapping": { - "field": "attributes.alt_phone_number" - } - }, - { - "column_name": "reminders", - "type": "Event", - "json_mapping": { - "field": "obs.fieldCode", - "concept": "163164AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "column_name": "cohabitants", - "type": "Client", - "json_mapping": { - "field": "attributes.cohabitants" - } - }, - { - "column_name": "alt_name", - "type": "Event", - "json_mapping": { - "field": "obs.fieldCode", - "concept": "163258AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "column_name": "alt_phone_number", - "type": "Client", - "json_mapping": { - "field": "attributes.alt_phone_number" - } - }, - { - "column_name": "edd", - "type": "Client", - "json_mapping": { - "field": "attributes.edd" - } - }, - { - "column_name": "red_flag_count", - "type": "Client", - "json_mapping": { - "field": "attributes.red_flag_count" - } - }, - { - "column_name": "yellow_flag_count", - "type": "Client", - "json_mapping": { - "field": "attributes.yellow_flag_count" - } - }, - { - "column_name": "contact_status", - "type": "Client", - "json_mapping": { - "field": "attributes.contact_status" - } - }, - { - "column_name": "previous_contact_status", - "type": "Client", - "json_mapping": { - "field": "attributes.previous_contact_status" - } - }, - { - "column_name": "next_contact", - "type": "Client", - "json_mapping": { - "field": "attributes.next_contact" - } - }, - { - "column_name": "next_contact_date", - "type": "Client", - "json_mapping": { - "field": "attributes.next_contact_date" - } - }, - { - "column_name": "last_contact_record_date", - "type": "Client", - "json_mapping": { - "field": "attributes.last_contact_record_date" - } - }, - { - "column_name": "province", - "type": "Client", - "json_mapping": { - "field": "attributes.province" - } - }, - { - "column_name": "district", - "type": "Client", - "json_mapping": { - "field": "attributes.district" - } - }, - { - "column_name": "subdistrict", - "type": "Client", - "json_mapping": { - "field": "attributes.subdistrict" - } - }, - { - "column_name": "health_facility", - "type": "Client", - "json_mapping": { - "field": "attributes.health_facility" - } - }, - { - "column_name": "village", - "type": "Client", - "json_mapping": { - "field": "attributes.village" - } - }, - { - "column_name": "visit_start_date", - "type": "Client", - "json_mapping": { - "field": "attributes.visit_start_date" - } - } - ] - }, - { - "name": "ec_client", - "columns": [ - { - "column_name": "base_entity_id", - "type": "Client", - "json_mapping": { - "field": "baseEntityId" - } - }, - { - "column_name": "register_id", - "type": "Client", - "json_mapping": { - "field": "identifiers.ANC_ID" - } - }, - { - "column_name": "first_name", - "type": "Client", - "json_mapping": { - "field": "firstName" - } - }, - { - "column_name": "last_name", - "type": "Client", - "json_mapping": { - "field": "lastName" - } - }, - { - "column_name": "dob", - "type": "Client", - "json_mapping": { - "field": "birthdate" - } - }, - { - "column_name": "dob_unknown", - "type": "Client", - "json_mapping": { - "field": "birthdateApprox" - } - }, - { - "column_name": "last_interacted_with", - "type": "Event", - "json_mapping": { - "field": "version" - } - }, - { - "column_name": "date_removed", - "type": "Client", - "json_mapping": { - "field": "attributes.date_removed" - } - }, - { - "column_name": "home_address", - "type": "Client", - "json_mapping": { - "field": "addresses.address2" - } - } - ] - } - ] +{ + "bindobjects": [ + { + "name": "ec_client", + "columns": [ + { + "column_name": "base_entity_id", + "type": "Client", + "json_mapping": { + "field": "baseEntityId" + } + }, + { + "column_name": "register_id", + "type": "Client", + "json_mapping": { + "field": "identifiers.ANC_ID" + } + }, + { + "column_name": "uid", + "type": "Client", + "json_mapping": { + "field": "identifiers.uid" + } + }, + { + "column_name": "ssn", + "type": "Client", + "json_mapping": { + "field": "identifiers.ssn" + } + }, + { + "column_name": "first_name", + "type": "Client", + "json_mapping": { + "field": "firstName" + } + }, + { + "column_name": "last_name", + "type": "Client", + "json_mapping": { + "field": "lastName" + } + }, + { + "column_name": "dob", + "type": "Client", + "json_mapping": { + "field": "birthdate" + } + }, + { + "column_name": "dob_unknown", + "type": "Client", + "json_mapping": { + "field": "birthdateApprox" + } + }, + { + "column_name": "last_interacted_with", + "type": "Event", + "json_mapping": { + "field": "version" + } + }, + { + "column_name": "date_removed", + "type": "Client", + "json_mapping": { + "field": "attributes.date_removed" + } + }, + { + "column_name": "home_address", + "type": "Client", + "json_mapping": { + "field": "addresses.address2" + } + } + ] + }, + + { + "name": "ec_mother_details", + "columns": [ + { + "column_name": "base_entity_id", + "type": "Client", + "json_mapping": { + "field": "baseEntityId" + } + }, + { + "column_name": "uid_unknown", + "type": "Client", + "json_mapping": { + "field": "attributes.uid_unknown" + } + }, + { + "column_name": "uid_unknown_reason", + "type": "Client", + "json_mapping": { + "field": "attributes.uid_unknown_reason" + } + },{ + "column_name": "ssn_status", + "type": "Client", + "json_mapping": { + "field": "attributes.ssn_status" + } + }, + { + "column_name": "phone_number", + "type": "Client", + "json_mapping": { + "field": "attributes.phone_number" + } + }, + { + "column_name": "phone_number_unknown", + "type": "Client", + "json_mapping": { + "field": "attributes.phone_number_unknown" + } + }, + { + "column_name": "phone_number_unknown_reason", + "type": "Client", + "json_mapping": { + "field": "attributes.phone_number_unknown_reason" + } + }, + { + "column_name": "alt_name", + "type": "Event", + "json_mapping": { + "field": "attributes.alt_name" + } + }, + { + "column_name": "alt_phone_number", + "type": "Client", + "json_mapping": { + "field": "attributes.alt_phone_number" + } + }, + { + "column_name": "reminders", + "type": "Event", + "json_mapping": { + "field": "obs.fieldCode", + "concept": "163164AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + }, + { + "column_name": "cohabitants", + "type": "Client", + "json_mapping": { + "field": "attributes.cohabitants" + } + }, + { + "column_name": "alt_name", + "type": "Event", + "json_mapping": { + "field": "obs.fieldCode", + "concept": "163258AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + }, + { + "column_name": "alt_phone_number", + "type": "Client", + "json_mapping": { + "field": "attributes.alt_phone_number" + } + }, + { + "column_name": "edd", + "type": "Client", + "json_mapping": { + "field": "attributes.edd" + } + }, + { + "column_name": "red_flag_count", + "type": "Client", + "json_mapping": { + "field": "attributes.red_flag_count" + } + }, + { + "column_name": "yellow_flag_count", + "type": "Client", + "json_mapping": { + "field": "attributes.yellow_flag_count" + } + }, + { + "column_name": "contact_status", + "type": "Client", + "json_mapping": { + "field": "attributes.contact_status" + } + }, + { + "column_name": "previous_contact_status", + "type": "Client", + "json_mapping": { + "field": "attributes.previous_contact_status" + } + }, + { + "column_name": "next_contact", + "type": "Client", + "json_mapping": { + "field": "attributes.next_contact" + } + }, + { + "column_name": "next_contact_date", + "type": "Client", + "json_mapping": { + "field": "attributes.next_contact_date" + } + }, + { + "column_name": "last_contact_record_date", + "type": "Client", + "json_mapping": { + "field": "attributes.last_contact_record_date" + } + }, + { + "column_name": "province", + "type": "Client", + "json_mapping": { + "field": "attributes.province" + } + }, + { + "column_name": "district", + "type": "Client", + "json_mapping": { + "field": "attributes.district" + } + }, + { + "column_name": "subdistrict", + "type": "Client", + "json_mapping": { + "field": "attributes.subdistrict" + } + }, + { + "column_name": "health_facility", + "type": "Client", + "json_mapping": { + "field": "attributes.health_facility" + } + }, + { + "column_name": "village", + "type": "Client", + "json_mapping": { + "field": "attributes.village" + } + }, + { + "column_name": "visit_start_date", + "type": "Client", + "json_mapping": { + "field": "attributes.visit_start_date" + } + }, + { + "column_name": "last_visit_date", + "type": "Client", + "json_mapping": { + "field": "attributes.last_visit_date" + } + } + ] + } + ] } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/anc_counselling_treatment.json b/opensrp-anc/src/main/assets/json.form/anc_counselling_treatment.json index 315f3f419..0750e060a 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_counselling_treatment.json +++ b/opensrp-anc/src/main/assets/json.form/anc_counselling_treatment.json @@ -1,5662 +1,5972 @@ { - "validate_on_submit": true, - "display_scroll_bars": true, - "skip_blank_steps": true, - "count": "12", - "encounter_type": "Counselling and Treatment", - "entity_id": "", - "relational_id": "", - "form_version": "0.0.1", - "global_previous": [ - "iptp_sp1", - "iptp_sp2", - "iptp_sp3", - "iptp_sp1_date", - "iptp_sp2_date", - "tt1_date", - "tt2_date", - "tt3_date", - "tt1_date_done", - "tt2_date_done", - "deworm", - "flu_date", - "hepb_positive", - "ipv_subject" - ], - "metadata": { - "start": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "start", - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "end": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "end", - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "today": { - "openmrs_entity_parent": "", - "openmrs_entity": "encounter", - "openmrs_entity_id": "encounter_date" - }, - "deviceid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "deviceid", - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "subscriberid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "subscriberid", - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "simserial": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "simserial", - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "phonenumber": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "phonenumber", - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "encounter_location": "", - "look_up": { - "entity_id": "", - "value": "" - } - }, - "default_values": [ - "flu_date" - ], - "editable_fields": [ - "flu_date" - ], - "step1": { - "title": "{{anc_counselling_treatment.step1.title}}", - "next": "step2", - "fields": [ - { - "key": "danger_signs_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.danger_signs_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.danger_signs_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "severe_hypertension_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.severe_hypertension_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.severe_hypertension_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "hypertension_pre_eclampsia_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.hypertension_pre_eclampsia_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.hypertension_pre_eclampsia_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "pre_eclampsia_dialog_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.pre_eclampsia_dialog_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.pre_eclampsia_dialog_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step1.pre_eclampsia_dialog_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "severe_pre_eclampsia_dialog_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.severe_pre_eclampsia_dialog_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.severe_pre_eclampsia_dialog_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step1.severe_pre_eclampsia_dialog_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "fever_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.fever_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.fever_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step1.fever_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "abnormal_pulse_rate_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.abnormal_pulse_rate_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.abnormal_pulse_rate_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "resp_distress_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.resp_distress_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.resp_distress_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "low_oximetry_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.low_oximetry_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.low_oximetry_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "abn_cardiac_exam_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.abn_cardiac_exam_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.abn_cardiac_exam_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "abn_breast_exam_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.abn_breast_exam_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.abn_breast_exam_toaster.toaster_info_text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "abn_abdominal_exam_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.abn_abdominal_exam_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.abn_abdominal_exam_toaster.toaster_info_text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "abn_pelvic_exam_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.abn_pelvic_exam_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.abn_pelvic_exam_toaster.toaster_info_text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "no_fetal_heartbeat_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.no_fetal_heartbeat_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.no_fetal_heartbeat_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step1.no_fetal_heartbeat_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "abn_feat_heart_rate_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step1.abn_feat_heart_rate_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step1.abn_feat_heart_rate_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "referred_hosp", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1788AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step1.referred_hosp.label}}", - "multi_relevance": true, - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step1.referred_hosp.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step1.referred_hosp.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step1.referred_hosp.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "referred_hosp_notdone", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165307AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select one", - "type": "check_box", - "label": "{{anc_counselling_treatment.step1.referred_hosp_notdone.label}}", - "hint": "{{anc_counselling_treatment.step1.referred_hosp_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "woman_refused", - "text": "{{anc_counselling_treatment.step1.referred_hosp_notdone.options.woman_refused.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165306AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step1.referred_hosp_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step1.referred_hosp_notdone.v_required.err}}" - }, - "relevance": { - "step1:referred_hosp": { - "ex-checkbox": [ - { - "or": [ - "no" - ] - } - ] - } - } - }, - { - "key": "referred_hosp_notdone_other", - "openmrs_entity_parent": "165307AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step1.referred_hosp_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step1:referred_hosp_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - } - ] - }, - "step2": { - "title": "{{anc_counselling_treatment.step2.title}}", - "next": "step3", - "fields": [ - { - "key": "caffeine_counsel", - "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step2.caffeine_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step2.caffeine_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step2.caffeine_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step2.caffeine_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step2.caffeine_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step2.caffeine_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "caffeine_counsel_notdone", - "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step2:caffeine_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "caffeine_counsel_notdone_other", - "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step2:caffeine_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "tobacco_counsel", - "openmrs_entity_parent": "1455AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step2.tobacco_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step2.tobacco_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step2.tobacco_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step2.tobacco_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step2.tobacco_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step2.tobacco_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "tobacco_counsel_notdone", - "openmrs_entity_parent": "1455AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step2:tobacco_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "tobacco_counsel_notdone_other", - "openmrs_entity_parent": "1455AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step2:tobacco_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "shs_counsel", - "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step2.shs_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step2.shs_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step2.shs_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step2.shs_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step2.shs_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step2.shs_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "shs_counsel_notdone", - "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step2.shs_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step2.shs_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step2.shs_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step2.shs_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step2:shs_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "shs_counsel_notdone_other", - "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step2.shs_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step2:shs_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "condom_counsel", - "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step2.condom_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step2.condom_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step2.condom_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step2.condom_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step2.condom_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "condom_counsel_notdone", - "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step2.condom_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step2.condom_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step2.condom_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step2.condom_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step2:condom_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "condom_counsel_notdone_other", - "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step2.condom_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step2:condom_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "alcohol_substance_counsel", - "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "alcohol_substance_counsel_notdone", - "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step2:alcohol_substance_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "alcohol_substance_counsel_notdone_other", - "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step2:alcohol_substance_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - } - ] - }, - "step3": { - "title": "{{anc_counselling_treatment.step3.title}}", - "next": "step4", - "fields": [ - { - "key": "nausea_counsel", - "openmrs_entity_parent": "165314AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.nausea_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.nausea_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.nausea_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.nausea_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.nausea_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step3.nausea_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "nausea_counsel_notdone", - "openmrs_entity_parent": "165314AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:nausea_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "nausea_counsel_notdone_other", - "openmrs_entity_parent": "165314AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.nausea_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:nausea_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "nausea_not_relieved_counsel", - "openmrs_entity_parent": "165315AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "nausea_not_relieved_counsel_notdone", - "openmrs_entity_parent": "165315AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:nausea_not_relieved_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "nausea_not_relieved_counsel_notdone_other", - "openmrs_entity_parent": "165315AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:nausea_not_relieved_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "nausea_pharma", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "heartburn_counsel", - "openmrs_entity_parent": "165316AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.heartburn_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.heartburn_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.heartburn_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.heartburn_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.heartburn_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step3.heartburn_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "heartburn_counsel_notdone", - "openmrs_entity_parent": "165316AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:heartburn_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "heartburn_counsel_notdone_other", - "openmrs_entity_parent": "165316AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:heartburn_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "heartburn_not_relieved_counsel", - "openmrs_entity_parent": "165317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "heartburn_not_relieved_counsel_notdone", - "openmrs_entity_parent": "165317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:heartburn_not_relieved_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "heartburn_not_relieved_counsel_notdone_other", - "openmrs_entity_parent": "165317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:heartburn_not_relieved_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "antacid", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "leg_cramp_counsel", - "openmrs_entity_parent": "165318AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.leg_cramp_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.leg_cramp_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.leg_cramp_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step3.leg_cramp_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "leg_cramp_counsel_notdone", - "openmrs_entity_parent": "165318AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:leg_cramp_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "leg_cramp_counsel_notdone_other", - "openmrs_entity_parent": "165318AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:leg_cramp_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "leg_cramp_not_relieved_counsel", - "openmrs_entity_parent": "165319AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "leg_cramp_not_relieved_counsel_notdone", - "openmrs_entity_parent": "165319AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:leg_cramp_not_relieved_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "leg_cramp_not_relieved_counsel_notdone_other", - "openmrs_entity_parent": "165319AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:leg_cramp_not_relieved_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "constipation_counsel", - "openmrs_entity_parent": "165320AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.constipation_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.constipation_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.constipation_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.constipation_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.constipation_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step3.constipation_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "constipation_counsel_notdone", - "openmrs_entity_parent": "165320AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:constipation_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "constipation_counsel_notdone_other", - "openmrs_entity_parent": "165320AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.constipation_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:constipation_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "constipation_not_relieved_counsel", - "openmrs_entity_parent": "165321AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "constipation_not_relieved_counsel_notdone", - "openmrs_entity_parent": "165321AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:constipation_not_relieved_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "constipation_not_relieved_counsel_notdone_other", - "openmrs_entity_parent": "165321AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:constipation_not_relieved_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "back_pelvic_pain_counsel", - "openmrs_entity_parent": "165322AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.v_required.err}}" - } - }, - { - "key": "back_pelvic_pain_counsel_notdone", - "openmrs_entity_parent": "165322AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:back_pelvic_pain_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "back_pelvic_pain_counsel_notdone_other", - "openmrs_entity_parent": "165322AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:back_pelvic_pain_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "back_pelvic_pain_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_toaster.text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "varicose_oedema_counsel", - "openmrs_entity_parent": "165323AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.v_required.err}}" - } - }, - { - "key": "varicose_oedema_counsel_notdone", - "openmrs_entity_parent": "165323AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step3:varicose_oedema_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "varicose_oedema_counsel_notdone_other", - "openmrs_entity_parent": "165323AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:varicose_oedema_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "varicose_vein_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step3.varicose_vein_toaster.text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - } - ] - }, - "step4": { - "title": "{{anc_counselling_treatment.step4.title}}", - "next": "step5", - "fields": [ - { - "key": "body_mass_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step4.body_mass_toaster.text}}", - "toaster_type": "info", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "average_weight_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step4.average_weight_toaster.text}}", - "toaster_type": "info", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "eat_exercise_counsel", - "openmrs_entity_parent": "165324AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step4.eat_exercise_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step4.eat_exercise_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step4.eat_exercise_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step4.eat_exercise_counsel.v_required.err}}" - } - }, - { - "key": "eat_exercise_counsel_notdone", - "openmrs_entity_parent": "165324AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.v_required.err}}" - }, - "relevance": { - "step4:eat_exercise_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "eat_exercise_counsel_notdone_other", - "openmrs_entity_parent": "165324AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step4:eat_exercise_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "average_weight_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step4.average_weight_toaster.text}}", - "toaster_type": "positive", - "relevance": { - "step4:eat_exercise_counsel": { - "type": "string", - "ex": "equalTo(., \"done\")" - } - } - }, - { - "key": "increase_energy_counsel", - "openmrs_entity_parent": "165326AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step4.increase_energy_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step4.increase_energy_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step4.increase_energy_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step4.increase_energy_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step4.increase_energy_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step4.increase_energy_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "increase_energy_counsel_notdone", - "openmrs_entity_parent": "165326AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.v_required.err}}" - }, - "relevance": { - "step4:increase_energy_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "increase_energy_counsel_notdone_other", - "openmrs_entity_parent": "165326AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step4:increase_energy_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "balanced_energy_counsel", - "openmrs_entity_parent": "165327AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step4.balanced_energy_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step4.balanced_energy_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step4.balanced_energy_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step4.balanced_energy_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "balanced_energy_counsel_notdone", - "openmrs_entity_parent": "165327AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.v_required.err}}" - }, - "relevance": { - "step4:balanced_energy_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "balanced_energy_counsel_notdone_other", - "openmrs_entity_parent": "165327AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step4:balanced_energy_counsel_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - } - ] - }, - "step5": { - "title": "{{anc_counselling_treatment.step5.title}}", - "next": "step6", - "fields": [ - { - "key": "hypertension_counsel", - "openmrs_entity_parent": "165325AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.hypertension_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.hypertension_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.hypertension_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.hypertension_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.hypertension_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.hypertension_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "hiv_positive_counsel", - "openmrs_entity_parent": "165328AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.hiv_positive_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.hiv_positive_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.hiv_positive_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.hiv_positive_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.hiv_positive_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.hiv_positive_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "hepb_positive_counsel", - "openmrs_entity_parent": "165329AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.hepb_positive_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.hepb_positive_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.hepb_positive_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.hepb_positive_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.hepb_positive_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.hepb_positive_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "hepc_positive_counsel", - "openmrs_entity_parent": "165330AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.hepc_positive_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.hepc_positive_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.hepc_positive_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.hepc_positive_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.hepc_positive_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.hepc_positive_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "syphilis_low_prev_counsel", - "openmrs_entity_parent": "165331AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "low_prev_allergy_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_title}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "syphilis_high_prev_counsel", - "openmrs_entity_parent": "165332AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "high_prev_allergy_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_title}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "penicillin", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "asb_positive_counsel", - "openmrs_entity_parent": "165343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.asb_positive_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.asb_positive_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.asb_positive_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.asb_positive_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.asb_positive_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.asb_positive_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "asb_positive_counsel_notdone", - "openmrs_entity_parent": "165343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "stock_out", - "text": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.options.stock_out.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.v_required.err}}" - }, - "relevance": { - "step5:asb_positive_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "asb_positive_counsel_notdone_other", - "openmrs_entity_parent": "165343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step5:asb_positive_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "antibiotic", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "diabetes_counsel", - "openmrs_entity_parent": "165333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.diabetes_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.diabetes_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.diabetes_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.diabetes_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.diabetes_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.diabetes_counsel.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ifa_anaemia", - "openmrs_entity_parent": "165348AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.ifa_anaemia.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.ifa_anaemia.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.ifa_anaemia.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.ifa_anaemia.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.ifa_anaemia.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step5.ifa_anaemia.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ifa_anaemia_notdone", - "openmrs_entity_parent": "165348AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.label}}", - "hint": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "side_effects", - "text": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.options.side_effects.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step5:ifa_anaemia": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "ifa_anaemia_notdone_other", - "openmrs_entity_parent": "165348AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step5:ifa_anaemia_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "ifa_medication", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "tb_positive_counseling", - "openmrs_entity_parent": "165334AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step5.tb_positive_counseling.label}}", - "label_info_text": "{{anc_counselling_treatment.step5.tb_positive_counseling.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step5.tb_positive_counseling.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step5.tb_positive_counseling.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step5.tb_positive_counseling.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - } - ] - }, - "step6": { - "title": "{{anc_counselling_treatment.step6.title}}", - "next": "step7", - "fields": [ - { - "key": "pe_risk_aspirin", - "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "pe_risk_aspirin_notdone", - "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "no_stock", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.no_stock.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "side_effects", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.side_effects.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "allergy", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.allergy.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.v_required.err}}" - }, - "relevance": { - "step6:pe_risk_aspirin": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "pe_risk_aspirin_notdone_other", - "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step6:pe_risk_aspirin_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "pe_risk_aspirin_calcium", - "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "pe_risk_aspirin_calcium_notdone", - "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "no_stock", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.no_stock.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "side_effects", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.side_effects.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "allergy", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.allergy.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.v_required.err}}" - }, - "relevance": { - "step6:pe_risk_aspirin_calcium": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "pe_risk_aspirin_calcium_notdone_other", - "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step6:pe_risk_aspirin_calcium_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "aspirin", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "hiv_risk_counsel", - "openmrs_entity_parent": "165351AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step6.hiv_risk_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step6.hiv_risk_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step6.hiv_risk_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step6.hiv_risk_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step6.hiv_risk_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "prep_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step6.prep_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step6.prep_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step6.prep_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "hiv_prep", - "openmrs_entity_parent": "165335AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step6.hiv_prep.label}}", - "label_info_text": "{{anc_counselling_treatment.step6.hiv_prep.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step6.hiv_prep.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step6.hiv_prep.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step6.hiv_prep.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "hiv_prep_notdone", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165336AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_counselling_treatment.step6.hiv_prep_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "refered_instead", - "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.refered_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no_drugs", - "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.no_drugs.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "woman_refused", - "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.woman_refused.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "127750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step6.hiv_prep_notdone.v_required.err}}" - }, - "relevance": { - "step6:hiv_prep": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "hiv_prep_notdone_other", - "openmrs_entity_parent": "165336AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step6.hiv_prep_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step6:hiv_prep_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "prep", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "gdm_risk_counsel", - "openmrs_entity_parent": "165337AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step6.gdm_risk_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step6.gdm_risk_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step6.gdm_risk_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step6.gdm_risk_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step6.gdm_risk_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - } - ] - }, - "step7": { - "title": "{{anc_counselling_treatment.step7.title}}", - "next": "step8", - "fields": [ - { - "key": "danger_signs_counsel", - "openmrs_entity_parent": "161068AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.danger_signs_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step7.danger_signs_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step7.danger_signs_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.danger_signs_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.danger_signs_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "emergency_hosp_counsel", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - } - ] - }, - { - "key": "anc_contact_counsel", - "openmrs_entity_parent": "161013AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.anc_contact_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step7.anc_contact_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step7.anc_contact_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.anc_contact_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.anc_contact_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "birth_prep_counsel", - "openmrs_entity_parent": "161069AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.birth_prep_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step7.birth_prep_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step7.birth_prep_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.birth_prep_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.birth_prep_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "birth_plan_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step7.birth_plan_toaster.text}}", - "toaster_type": "info", - "toaster_info_text": "{{anc_counselling_treatment.step7.birth_plan_toaster.toaster_info_text}}", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "delivery_place", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159758AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.delivery_place.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "facility", - "text": "{{anc_counselling_treatment.step7.delivery_place.options.facility.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1537AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "facility_elective", - "text": "{{anc_counselling_treatment.step7.delivery_place.options.facility_elective.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "155886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "home", - "text": "{{anc_counselling_treatment.step7.delivery_place.options.home.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1536AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step7.delivery_place.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "encourage_facility_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step7.encourage_facility_toaster.text}}", - "toaster_type": "warning", - "relevance": { - "step7:delivery_place": { - "type": "string", - "ex": "equalTo(., \"home\")" - } - } - }, - { - "key": "rh_negative_counsel", - "openmrs_entity_parent": "165338AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.rh_negative_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step7.rh_negative_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step7.rh_negative_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.rh_negative_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.rh_negative_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "gbs_agent_counsel", - "openmrs_entity_parent": "165339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.gbs_agent_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step7.gbs_agent_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step7.gbs_agent_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.gbs_agent_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.gbs_agent_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "family_planning_counsel", - "openmrs_entity_parent": "165340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.family_planning_counsel.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.family_planning_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.family_planning_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step7.family_planning_counsel.v_required.err}}" - } - }, - { - "key": "family_planning_type", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.family_planning_type.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "none", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.none.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "cu_iud", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.cu_iud.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "lng_iud", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.lng_iud.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "etg_implant", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.etg_implant.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "lng_implant", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.lng_implant.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "dmpa_im", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.dmpa_im.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "dmpa_sc", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.dmpa_sc.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "net_en", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.net_en.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "pop", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.pop.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "coc", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.coc.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "combined_patch", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.combined_patch.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "combined_ring", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.combined_ring.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "pvr", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.pvr.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "lam", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.lam.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "male_condoms", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.male_condoms.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "female_condoms", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.female_condoms.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "male_sterilization", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.male_sterilization.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "female_sterilization", - "text": "{{anc_counselling_treatment.step7.family_planning_type.options.female_sterilization.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "step7:family_planning_counsel": { - "type": "string", - "ex": "equalTo(., \"done\")" - } - } - }, - { - "key": "breastfeed_counsel", - "openmrs_entity_parent": "1910AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step7.breastfeed_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step7.breastfeed_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step7.breastfeed_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step7.breastfeed_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step7.breastfeed_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - } - ] - }, - "step8": { - "title": "{{anc_counselling_treatment.step8.title}}", - "next": "step9", - "fields": [ - { - "key": "ipv_support", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.ipv_support.label}}", - "label_info_text": "{{anc_counselling_treatment.step8.ipv_support.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step8.ipv_support.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step8.ipv_support.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step8.ipv_support.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step8.ipv_support.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ipv_support_notdone", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.ipv_support_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred", - "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.referred.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "provider_unavailable", - "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.provider_unavailable.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "space_unavailable", - "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.space_unavailable.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "confidentiality", - "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.confidentiality.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ipv_support_notdone_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step8.ipv_support_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step8:ipv_support_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "ipv_care", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step8.ipv_care.label}}", - "label_text_style": "bold", - "exclusive": [ - "no_action" - ], - "options": [ - { - "key": "no_action", - "text": "{{anc_counselling_treatment.step8.ipv_care.options.no_action.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "safety_assessment", - "text": "{{anc_counselling_treatment.step8.ipv_care.options.safety_assessment.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "mental_health_care", - "text": "{{anc_counselling_treatment.step8.ipv_care.options.mental_health_care.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "care_other_symptoms", - "text": "{{anc_counselling_treatment.step8.ipv_care.options.care_other_symptoms.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "referred", - "text": "{{anc_counselling_treatment.step8.ipv_care.options.referred.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "phys_violence_worse", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.phys_violence_worse.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step8.phys_violence_worse.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step8.phys_violence_worse.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "used_weapon", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.used_weapon.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step8.used_weapon.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step8.used_weapon.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "strangle", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.strangle.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step8.strangle.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step8.strangle.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "beaten", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.beaten.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step8.beaten.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step8.beaten.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "jealous", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.jealous.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step8.jealous.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step8.jealous.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "believe_kill", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step8.believe_kill.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_counselling_treatment.step8.believe_kill.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "no", - "text": "{{anc_counselling_treatment.step8.believe_kill.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ipv_referrals", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step8.ipv_referrals.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "care_health_facility", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.care_health_facility.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "crisis_intervention", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.crisis_intervention.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "police", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.police.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "shelter", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.shelter.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "legal_aid", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.legal_aid.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "child_protection", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.child_protection.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "livelihood_support", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.livelihood_support.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ipv_referrals_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step8.ipv_referrals_other.hint}}", - "edit_type": "name", - "relevance": { - "step8:ipv_referrals": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - } - ] - }, - "step9": { - "title": "{{anc_counselling_treatment.step9.title}}", - "next": "step10", - "fields": [ - { - "key": "ifa_high_prev", - "openmrs_entity_parent": "165355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step9.ifa_high_prev.label}}", - "label_info_text": "{{anc_counselling_treatment.step9.ifa_high_prev.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step9.ifa_high_prev.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step9.ifa_high_prev.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step9.ifa_high_prev.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.ifa_high_prev.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ifa_high_prev_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "ifa_high_prev_notdone", - "openmrs_entity_parent": "165355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.label}}", - "hint": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step9:ifa_high_prev": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - }, - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.v_required.err}}" - } - }, - { - "key": "ifa_high_prev_notdone_other", - "openmrs_entity_parent": "165355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step9:ifa_high_prev_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "ifa_low_prev", - "openmrs_entity_parent": "165356AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step9.ifa_low_prev.label}}", - "label_info_text": "{{anc_counselling_treatment.step9.ifa_low_prev.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step9.ifa_low_prev.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step9.ifa_low_prev.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step9.ifa_low_prev.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.ifa_low_prev.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ifa_low_prev_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "ifa_low_prev_notdone", - "openmrs_entity_parent": "165356AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.label}}", - "hint": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.v_required.err}}" - }, - "relevance": { - "step9:ifa_low_prev": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "ifa_low_prev_notdone_other", - "openmrs_entity_parent": "165356AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step9:ifa_low_prev_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "ifa_weekly", - "openmrs_entity_parent": "165357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step9.ifa_weekly.label}}", - "label_info_text": "{{anc_counselling_treatment.step9.ifa_weekly.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step9.ifa_weekly.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step9.ifa_weekly.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step9.ifa_weekly.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.ifa_weekly.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "ifa_weekly_notdone", - "openmrs_entity_parent": "165357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.label}}", - "hint": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.v_required.err}}" - }, - "relevance": { - "step9:ifa_weekly": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "ifa_weekly_notdone_other", - "openmrs_entity_parent": "165357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step9.ifa_weekly_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step9:ifa_weekly_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "ifa", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "calcium_supp", - "openmrs_entity_parent": "165350AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step9.calcium_supp.label}}", - "label_info_text": "{{anc_counselling_treatment.step9.calcium_supp.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step9.calcium_supp.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step9.calcium_supp.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step9.calcium_supp.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.calcium_supp.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "calcium_supp_notdone", - "openmrs_entity_parent": "165350AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step9.calcium_supp_notdone.label}}", - "hint": "{{anc_counselling_treatment.step9.calcium_supp_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step9.calcium_supp_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step9.calcium_supp_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step9:calcium_supp": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - }, - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.calcium_supp_notdone.v_required.err}}" - } - }, - { - "key": "calcium_supp_notdone_other", - "openmrs_entity_parent": "165350AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step9.calcium_supp_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step9:calcium_supp_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "calcium", - "type": "hidden", - "label_text_style": "bold", - "text": "{{anc_counselling_treatment.step9.calcium.text}}", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "vita_supp", - "openmrs_entity_parent": "164804AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step9.vita_supp.label}}", - "label_info_text": "{{anc_counselling_treatment.step9.vita_supp.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step9.vita_supp.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step9.vita_supp.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step9.vita_supp.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.vita_supp.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "vita_supp_notdone", - "openmrs_entity_parent": "164804AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "check_box", - "label": "{{anc_counselling_treatment.step9.vita_supp_notdone.label}}", - "hint": "{{anc_counselling_treatment.step9.vita_supp_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step9.vita_supp_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step9.vita_supp_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step9.vita_supp_notdone.v_required.err}}" - }, - "relevance": { - "step9:vita_supp": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "vita_supp_notdone_other", - "openmrs_entity_parent": "164804AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step9.vita_supp_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step9:vita_supp_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "vita", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - } - ] - }, - "step10": { - "title": "{{anc_counselling_treatment.step10.title}}", - "next": "step11", - "fields": [ - { - "key": "deworm", - "openmrs_entity_parent": "159922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step10.deworm.label}}", - "label_info_text": "{{anc_counselling_treatment.step10.deworm.label_info_text}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step10.deworm.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step10.deworm.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step10.deworm.v_required.err}}" - } - }, - { - "key": "deworm_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "deworm_notdone", - "openmrs_entity_parent": "159922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step10.deworm_notdone.label}}", - "hint": "{{anc_counselling_treatment.step10.deworm_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step10.deworm_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step10.deworm_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step10.deworm_notdone.v_required.err}}" - }, - "relevance": { - "step10:deworm": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "deworm_notdone_other", - "openmrs_entity_parent": "159922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step10.deworm_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step10:deworm_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "alben_meben", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "iptp_sp1", - "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step10.iptp_sp1.label}}", - "label_info_text": "{{anc_counselling_treatment.step10.iptp_sp1.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step10.iptp_sp1.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step10.iptp_sp1.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step10.iptp_sp1.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step10.iptp_sp1.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "iptp_sp1_dose_number", - "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165358AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "iptp_sp2", - "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step10.iptp_sp2.label}}", - "label_info_text": "{{anc_counselling_treatment.step10.iptp_sp2.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step10.iptp_sp2.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step10.iptp_sp2.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step10.iptp_sp2.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step10.iptp_sp2.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "iptp_sp2_dose_number", - "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165358AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "iptp_sp3", - "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step10.iptp_sp3.label}}", - "label_info_text": "{{anc_counselling_treatment.step10.iptp_sp3.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step10.iptp_sp3.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step10.iptp_sp3.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step10.iptp_sp3.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step10.iptp_sp3.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "iptp_sp3_dose_number", - "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165358AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "iptp_sp_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step10.iptp_sp_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step10.iptp_sp_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_counselling_treatment.step10.iptp_sp_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "iptp_sp_notdone", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165359AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_counselling_treatment.step10.iptp_sp_notdone.label}}", - "hint": "{{anc_counselling_treatment.step10.iptp_sp_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "stock_out", - "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.stock_out.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "expired", - "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.expired.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "iptp_sp_notdone_other", - "openmrs_entity_parent": "165359AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step10.iptp_sp_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step10:iptp_sp_notdone": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "sp", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "malaria_counsel", - "openmrs_entity_parent": "164884AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step10.malaria_counsel.label}}", - "label_info_text": "{{anc_counselling_treatment.step10.malaria_counsel.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step10.malaria_counsel.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done", - "text": "{{anc_counselling_treatment.step10.malaria_counsel.options.done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step10.malaria_counsel.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "malaria_counsel_notdone", - "openmrs_entity_parent": "164884AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.label}}", - "hint": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "referred_instead", - "text": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.options.referred_instead.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "step10:malaria_counsel": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "malaria_counsel_notdone_other", - "openmrs_entity_parent": "164884AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step10.malaria_counsel_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step10:malaria_counsel_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - } - ] - }, - "step11": { - "title": "{{anc_counselling_treatment.step11.title}}", - "next": "step12", - "fields": [ - { - "key": "tt1_date", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step11.tt1_date.label}}", - "label_info_text": "{{anc_counselling_treatment.step11.tt1_date.label_info_text}}", - "label_text_style": "bold", - "options": [ - { - "key": "done_today", - "text": "{{anc_counselling_treatment.step11.tt1_date.options.done_today.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "done_earlier", - "text": "{{anc_counselling_treatment.step11.tt1_date.options.done_earlier.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160699AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step11.tt1_date.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165228AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step11.tt1_date.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "tt1_dose_number", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "tt1_date_done_date_today_hidden", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "tt1_date_done", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{anc_counselling_treatment.step11.tt1_date_done.hint}}", - "expanded": "false", - "max_date": "today", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step11.tt1_date_done.v_required.err}}" - } - }, - { - "key": "tt2_date", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step11.tt2_date.label}}", - "label_info_text": "{{anc_counselling_treatment.step11.tt2_date.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step11.tt2_date.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done_today", - "text": "{{anc_counselling_treatment.step11.tt2_date.options.done_today.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "done_earlier", - "text": "{{anc_counselling_treatment.step11.tt2_date.options.done_earlier.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160699AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step11.tt2_date.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165228AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step11.tt2_date.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "tt2_dose_number", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "tt2_date_done_date_today_hidden", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "tt2_date_done", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{anc_counselling_treatment.step11.tt2_date_done.hint}}", - "expanded": "false", - "max_date": "today", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step11.tt2_date_done.v_required.err}}" - } - }, - { - "key": "tt_dose_notdone", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step11.tt_dose_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "vaccine_available", - "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.vaccine_available.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "woman_is_ill", - "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.woman_is_ill.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160585AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "woman_refused", - "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.woman_refused.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "127750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "allergies", - "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.allergies.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step11.tt_dose_notdone.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "tt_dose_notdone_other", - "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step11.tt_dose_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step11:tt_dose_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "flu_date", - "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step11.flu_date.label}}", - "label_info_text": "{{anc_counselling_treatment.step11.flu_date.label_info_text}}", - "label_info_title": "{{anc_counselling_treatment.step11.flu_date.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "done_today", - "text": "{{anc_counselling_treatment.step11.flu_date.options.done_today.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "done_earlier", - "text": "{{anc_counselling_treatment.step11.flu_date.options.done_earlier.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160699AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{anc_counselling_treatment.step11.flu_date.options.not_done.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165228AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step11.flu_date.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "flu_date_done_date_today_hidden", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_calculation_rules.yml" - } - } - } - }, - { - "key": "flu_date_done", - "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{anc_counselling_treatment.step11.flu_date_done.hint}}", - "expanded": "false", - "max_date": "today", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - }, - { - "key": "flu_dose_notdone", - "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_counselling_treatment.step11.flu_dose_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "vaccine_available", - "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.vaccine_available.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "woman_is_ill", - "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.woman_is_ill.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160585AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "woman_refused", - "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.woman_refused.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "127750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "allergies", - "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.allergies.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_counselling_treatment.step11.flu_dose_notdone.v_required.err}}" - }, - "relevance": { - "step11:flu_date": { - "type": "string", - "ex": "equalTo(., \"not_done\")" - } - } - }, - { - "key": "flu_dose_notdone_other", - "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_counselling_treatment.step11.flu_dose_notdone_other.hint}}", - "edit_type": "name", - "relevance": { - "step11:flu_dose_notdone": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "woman_immunised_flu_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step11.woman_immunised_flu_toaster.text}}", - "toaster_type": "positive", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ct_relevance_rules.yml" - } - } - } - } - ] - }, - "step12": { - "title": "{{anc_counselling_treatment.step12.title}}", - "fields": [ - { - "key": "prep_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_counselling_treatment.step12.prep_toaster.text}}", - "toaster_info_text": "{{anc_counselling_treatment.step12.prep_toaster.toaster_info_text}}", - "toaster_type": "info" - } - ] - }, - "properties_file_name": "anc_counselling_treatment" + "validate_on_submit": true, + "display_scroll_bars": true, + "skip_blank_steps": true, + "count": "12", + "encounter_type": "anc_counselling_treatment", + "entity_id": "", + "relational_id": "", + "form_version": "0.0.1", + "global_previous": [ + "iptp_sp1", + "iptp_sp2", + "iptp_sp3", + "iptp_sp1_date", + "iptp_sp2_date", + "tt1_date", + "tt2_date", + "tt3_date", + "tt1_date_done", + "tt2_date_done", + "deworm", + "flu_date", + "hepb_positive", + "ipv_subject" + ], + "metadata": { + "start": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "start", + "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "end": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "end", + "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "today": { + "openmrs_entity_parent": "", + "openmrs_entity": "encounter", + "openmrs_entity_id": "encounter_date" + }, + "deviceid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "deviceid", + "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "subscriberid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "subscriberid", + "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "simserial": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "simserial", + "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "phonenumber": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "phonenumber", + "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "encounter_location": "", + "look_up": { + "entity_id": "", + "value": "" + } + }, + "default_values": [ + "flu_date" + ], + "editable_fields": [ + "flu_date" + ], + "step1": { + "title": "{{anc_counselling_treatment.step1.title}}", + "next": "step2", + "fields": [ + { + "key": "danger_signs_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.danger_signs_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.danger_signs_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.danger_signs_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "severe_hypertension_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.severe_hypertension_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.severe_hypertension_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.severe_hypertension_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "hypertension_pre_eclampsia_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.hypertension_pre_eclampsia_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.hypertension_pre_eclampsia_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.hypertension_pre_eclampsia_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "pre_eclampsia_dialog_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.pre_eclampsia_dialog_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.pre_eclampsia_dialog_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.pre_eclampsia_dialog_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step1.pre_eclampsia_dialog_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "severe_pre_eclampsia_dialog_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.severe_pre_eclampsia_dialog_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.severe_pre_eclampsia_dialog_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.severe_pre_eclampsia_dialog_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step1.severe_pre_eclampsia_dialog_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "fever_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.fever_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.fever_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.fever_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step1.fever_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "abnormal_pulse_rate_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.abnormal_pulse_rate_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.abnormal_pulse_rate_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.abnormal_pulse_rate_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "resp_distress_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.resp_distress_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.resp_distress_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.resp_distress_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "low_oximetry_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.low_oximetry_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.low_oximetry_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.low_oximetry_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "abn_cardiac_exam_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.abn_cardiac_exam_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.abn_cardiac_exam_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.abn_cardiac_exam_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "abn_breast_exam_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.abn_breast_exam_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.abn_breast_exam_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.abn_breast_exam_toaster.toaster_info_text}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "abn_abdominal_exam_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.abn_abdominal_exam_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.abn_abdominal_exam_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.abn_abdominal_exam_toaster.toaster_info_text}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "abn_pelvic_exam_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.abn_pelvic_exam_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.abn_pelvic_exam_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.abn_pelvic_exam_toaster.toaster_info_text}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "no_fetal_heartbeat_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.no_fetal_heartbeat_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.no_fetal_heartbeat_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.no_fetal_heartbeat_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step1.no_fetal_heartbeat_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "abn_feat_heart_rate_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step1.abn_feat_heart_rate_toaster.text}}", + "translation_text": "anc_counselling_treatment.step1.abn_feat_heart_rate_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step1.abn_feat_heart_rate_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "referred_hosp", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1788AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step1.referred_hosp.label}}", + "multi_relevance": true, + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step1.referred_hosp.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step1.referred_hosp.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step1.referred_hosp.options.no.text}}", + "translation_text": "anc_counselling_treatment.step1.referred_hosp.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step1.referred_hosp.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "referred_hosp_notdone", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165307AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select one", + "type": "check_box", + "label": "{{anc_counselling_treatment.step1.referred_hosp_notdone.label}}", + "hint": "{{anc_counselling_treatment.step1.referred_hosp_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "woman_refused", + "text": "{{anc_counselling_treatment.step1.referred_hosp_notdone.options.woman_refused.text}}", + "translation_text": "anc_counselling_treatment.step1.referred_hosp_notdone.options.woman_refused.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165306AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step1.referred_hosp_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step1.referred_hosp_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step1.referred_hosp_notdone.v_required.err}}" + }, + "relevance": { + "step1:referred_hosp": { + "ex-checkbox": [ + { + "or": [ + "no" + ] + } + ] + } + } + }, + { + "key": "referred_hosp_notdone_other", + "openmrs_entity_parent": "165307AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step1.referred_hosp_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step1:referred_hosp_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + } + ] + }, + "step2": { + "title": "{{anc_counselling_treatment.step2.title}}", + "next": "step3", + "fields": [ + { + "key": "caffeine_counsel", + "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step2.caffeine_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step2.caffeine_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step2.caffeine_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step2.caffeine_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step2.caffeine_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step2.caffeine_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step2.caffeine_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step2.caffeine_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "caffeine_counsel_notdone", + "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step2.caffeine_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step2.caffeine_counsel_notdone.options.other.text", + "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step2:caffeine_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "caffeine_counsel_notdone_other", + "openmrs_entity_parent": "165311AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step2.caffeine_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step2:caffeine_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "tobacco_counsel", + "openmrs_entity_parent": "1455AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step2.tobacco_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step2.tobacco_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step2.tobacco_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step2.tobacco_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step2.tobacco_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step2.tobacco_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step2.tobacco_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step2.tobacco_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "tobacco_counsel_notdone", + "openmrs_entity_parent": "1455AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step2.tobacco_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step2.tobacco_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step2:tobacco_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "tobacco_counsel_notdone_other", + "openmrs_entity_parent": "1455AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step2.tobacco_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step2:tobacco_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "shs_counsel", + "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step2.shs_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step2.shs_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step2.shs_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step2.shs_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step2.shs_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step2.shs_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step2.shs_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step2.shs_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "shs_counsel_notdone", + "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step2.shs_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step2.shs_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step2.shs_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step2.shs_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step2.shs_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step2.shs_counsel_notdone.options.other.text", + "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step2:shs_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "shs_counsel_notdone_other", + "openmrs_entity_parent": "165312AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step2.shs_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step2:shs_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "condom_counsel", + "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step2.condom_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step2.condom_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step2.condom_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step2.condom_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step2.condom_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step2.condom_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step2.condom_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "condom_counsel_notdone", + "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step2.condom_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step2.condom_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step2.condom_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step2.condom_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step2.condom_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step2.condom_counsel_notdone.options.other.text", + "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step2:condom_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "condom_counsel_notdone_other", + "openmrs_entity_parent": "161594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step2.condom_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step2:condom_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "alcohol_substance_counsel", + "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step2.alcohol_substance_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step2.alcohol_substance_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step2.alcohol_substance_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "alcohol_substance_counsel_notdone", + "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step2.alcohol_substance_counsel_notdone.options.other.text", + "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step2:alcohol_substance_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "alcohol_substance_counsel_notdone_other", + "openmrs_entity_parent": "165313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step2.alcohol_substance_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step2:alcohol_substance_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + } + ] + }, + "step3": { + "title": "{{anc_counselling_treatment.step3.title}}", + "next": "step4", + "fields": [ + { + "key": "nausea_counsel", + "openmrs_entity_parent": "165314AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.nausea_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.nausea_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.nausea_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.nausea_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.nausea_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step3.nausea_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "nausea_counsel_notdone", + "openmrs_entity_parent": "165314AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.nausea_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:nausea_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "nausea_counsel_notdone_other", + "openmrs_entity_parent": "165314AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.nausea_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:nausea_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "nausea_not_relieved_counsel", + "openmrs_entity_parent": "165315AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_not_relieved_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_not_relieved_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "nausea_not_relieved_counsel_notdone", + "openmrs_entity_parent": "165315AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:nausea_not_relieved_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "nausea_not_relieved_counsel_notdone_other", + "openmrs_entity_parent": "165315AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.nausea_not_relieved_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:nausea_not_relieved_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "nausea_pharma", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "heartburn_counsel", + "openmrs_entity_parent": "165316AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.heartburn_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.heartburn_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.heartburn_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.heartburn_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.heartburn_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step3.heartburn_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "heartburn_counsel_notdone", + "openmrs_entity_parent": "165316AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:heartburn_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "heartburn_counsel_notdone_other", + "openmrs_entity_parent": "165316AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.heartburn_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:heartburn_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "heartburn_not_relieved_counsel", + "openmrs_entity_parent": "165317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_not_relieved_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_not_relieved_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "heartburn_not_relieved_counsel_notdone", + "openmrs_entity_parent": "165317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:heartburn_not_relieved_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "heartburn_not_relieved_counsel_notdone_other", + "openmrs_entity_parent": "165317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.heartburn_not_relieved_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:heartburn_not_relieved_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "antacid", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "leg_cramp_counsel", + "openmrs_entity_parent": "165318AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.leg_cramp_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.leg_cramp_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.leg_cramp_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step3.leg_cramp_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "leg_cramp_counsel_notdone", + "openmrs_entity_parent": "165318AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:leg_cramp_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "leg_cramp_counsel_notdone_other", + "openmrs_entity_parent": "165318AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.leg_cramp_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:leg_cramp_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "leg_cramp_not_relieved_counsel", + "openmrs_entity_parent": "165319AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "leg_cramp_not_relieved_counsel_notdone", + "openmrs_entity_parent": "165319AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:leg_cramp_not_relieved_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "leg_cramp_not_relieved_counsel_notdone_other", + "openmrs_entity_parent": "165319AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.leg_cramp_not_relieved_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:leg_cramp_not_relieved_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "constipation_counsel", + "openmrs_entity_parent": "165320AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.constipation_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.constipation_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.constipation_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.constipation_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.constipation_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step3.constipation_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "constipation_counsel_notdone", + "openmrs_entity_parent": "165320AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.constipation_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:constipation_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "constipation_counsel_notdone_other", + "openmrs_entity_parent": "165320AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.constipation_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:constipation_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "constipation_not_relieved_counsel", + "openmrs_entity_parent": "165321AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_not_relieved_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_not_relieved_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "constipation_not_relieved_counsel_notdone", + "openmrs_entity_parent": "165321AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:constipation_not_relieved_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "constipation_not_relieved_counsel_notdone_other", + "openmrs_entity_parent": "165321AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.constipation_not_relieved_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:constipation_not_relieved_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "back_pelvic_pain_counsel", + "openmrs_entity_parent": "165322AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.back_pelvic_pain_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.back_pelvic_pain_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel.v_required.err}}" + } + }, + { + "key": "back_pelvic_pain_counsel_notdone", + "openmrs_entity_parent": "165322AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:back_pelvic_pain_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "back_pelvic_pain_counsel_notdone_other", + "openmrs_entity_parent": "165322AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.back_pelvic_pain_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:back_pelvic_pain_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "back_pelvic_pain_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step3.back_pelvic_pain_toaster.text}}", + "translation_text": "anc_counselling_treatment.step3.back_pelvic_pain_toaster.text", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "varicose_oedema_counsel", + "openmrs_entity_parent": "165323AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step3.varicose_oedema_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step3.varicose_oedema_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step3.varicose_oedema_counsel.v_required.err}}" + } + }, + { + "key": "varicose_oedema_counsel_notdone", + "openmrs_entity_parent": "165323AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step3.varicose_oedema_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step3:varicose_oedema_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "varicose_oedema_counsel_notdone_other", + "openmrs_entity_parent": "165323AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step3.varicose_oedema_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step3:varicose_oedema_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "varicose_vein_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step3.varicose_vein_toaster.text}}", + "translation_text": "anc_counselling_treatment.step3.varicose_vein_toaster.text", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + } + ] + }, + "step4": { + "title": "{{anc_counselling_treatment.step4.title}}", + "next": "step5", + "fields": [ + { + "key": "body_mass_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step4.body_mass_toaster.text}}", + "translation_text": "anc_counselling_treatment.step4.body_mass_toaster.text", + "toaster_type": "info", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "average_weight_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step4.average_weight_toaster.text}}", + "translation_text": "anc_counselling_treatment.step4.average_weight_toaster.text", + "toaster_type": "info", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "eat_exercise_counsel", + "openmrs_entity_parent": "165324AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step4.eat_exercise_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step4.eat_exercise_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step4.eat_exercise_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step4.eat_exercise_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step4.eat_exercise_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step4.eat_exercise_counsel.v_required.err}}" + } + }, + { + "key": "eat_exercise_counsel_notdone", + "openmrs_entity_parent": "165324AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step4.eat_exercise_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step4.eat_exercise_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone.v_required.err}}" + }, + "relevance": { + "step4:eat_exercise_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "eat_exercise_counsel_notdone_other", + "openmrs_entity_parent": "165324AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step4.eat_exercise_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step4:eat_exercise_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "average_weight_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step4.average_weight_toaster.text}}", + "translation_text": "anc_counselling_treatment.step4.average_weight_toaster.text", + "toaster_type": "positive", + "relevance": { + "step4:eat_exercise_counsel": { + "type": "string", + "ex": "equalTo(., \"done\")" + } + } + }, + { + "key": "increase_energy_counsel", + "openmrs_entity_parent": "165326AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step4.increase_energy_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step4.increase_energy_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step4.increase_energy_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step4.increase_energy_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step4.increase_energy_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step4.increase_energy_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step4.increase_energy_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step4.increase_energy_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "increase_energy_counsel_notdone", + "openmrs_entity_parent": "165326AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step4.increase_energy_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step4.increase_energy_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone.v_required.err}}" + }, + "relevance": { + "step4:increase_energy_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "increase_energy_counsel_notdone_other", + "openmrs_entity_parent": "165326AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step4.increase_energy_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step4:increase_energy_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "balanced_energy_counsel", + "openmrs_entity_parent": "165327AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step4.balanced_energy_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step4.balanced_energy_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step4.balanced_energy_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step4.balanced_energy_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step4.balanced_energy_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step4.balanced_energy_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "balanced_energy_counsel_notdone", + "openmrs_entity_parent": "165327AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step4.balanced_energy_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step4.balanced_energy_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone.v_required.err}}" + }, + "relevance": { + "step4:balanced_energy_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "balanced_energy_counsel_notdone_other", + "openmrs_entity_parent": "165327AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step4.balanced_energy_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step4:balanced_energy_counsel_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + } + ] + }, + "step5": { + "title": "{{anc_counselling_treatment.step5.title}}", + "next": "step6", + "fields": [ + { + "key": "hypertension_counsel", + "openmrs_entity_parent": "165325AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.hypertension_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.hypertension_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.hypertension_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.hypertension_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.hypertension_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.hypertension_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.hypertension_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.hypertension_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "hiv_positive_counsel", + "openmrs_entity_parent": "165328AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.hiv_positive_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.hiv_positive_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.hiv_positive_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.hiv_positive_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.hiv_positive_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.hiv_positive_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.hiv_positive_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.hiv_positive_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "hepb_positive_counsel", + "openmrs_entity_parent": "165329AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.hepb_positive_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.hepb_positive_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.hepb_positive_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.hepb_positive_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.hepb_positive_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.hepb_positive_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.hepb_positive_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.hepb_positive_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "hepc_positive_counsel", + "openmrs_entity_parent": "165330AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.hepc_positive_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.hepc_positive_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.hepc_positive_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.hepc_positive_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.hepc_positive_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.hepc_positive_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.hepc_positive_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.hepc_positive_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "syphilis_low_prev_counsel", + "openmrs_entity_parent": "165331AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.syphilis_low_prev_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.syphilis_low_prev_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.syphilis_low_prev_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "low_prev_allergy_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", + "translation_text": "anc_counselling_treatment.step5.high_prev_allergy_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_title}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "syphilis_high_prev_counsel", + "openmrs_entity_parent": "165332AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.syphilis_high_prev_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.syphilis_high_prev_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "high_prev_allergy_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", + "translation_text": "anc_counselling_treatment.step5.high_prev_allergy_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step5.syphilis_high_prev_counsel.label_info_title}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "penicillin", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "asb_positive_counsel", + "openmrs_entity_parent": "165343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.asb_positive_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.asb_positive_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.asb_positive_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.asb_positive_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.asb_positive_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.asb_positive_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.asb_positive_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.asb_positive_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "asb_positive_counsel_notdone", + "openmrs_entity_parent": "165343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "stock_out", + "text": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.options.stock_out.text}}", + "translation_text": "anc_counselling_treatment.step5.asb_positive_counsel_notdone.options.stock_out.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step5.asb_positive_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone.v_required.err}}" + }, + "relevance": { + "step5:asb_positive_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "asb_positive_counsel_notdone_other", + "openmrs_entity_parent": "165343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step5.asb_positive_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step5:asb_positive_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "antibiotic", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "diabetes_counsel", + "openmrs_entity_parent": "165333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.diabetes_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.diabetes_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.diabetes_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.diabetes_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.diabetes_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.diabetes_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.diabetes_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.diabetes_counsel.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ifa_anaemia", + "openmrs_entity_parent": "165348AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.ifa_anaemia.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.ifa_anaemia.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.ifa_anaemia.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.ifa_anaemia.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.ifa_anaemia.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.ifa_anaemia.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.ifa_anaemia.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step5.ifa_anaemia.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ifa_anaemia_notdone", + "openmrs_entity_parent": "165348AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.label}}", + "hint": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step5.ifa_anaemia_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "side_effects", + "text": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.options.side_effects.text}}", + "translation_text": "anc_counselling_treatment.step5.ifa_anaemia_notdone.options.side_effects.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step5.ifa_anaemia_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step5:ifa_anaemia": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "ifa_anaemia_notdone_other", + "openmrs_entity_parent": "165348AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step5.ifa_anaemia_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step5:ifa_anaemia_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "ifa_medication", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "tb_positive_counseling", + "openmrs_entity_parent": "165334AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step5.tb_positive_counseling.label}}", + "label_info_text": "{{anc_counselling_treatment.step5.tb_positive_counseling.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step5.tb_positive_counseling.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step5.tb_positive_counseling.options.done.text}}", + "translation_text": "anc_counselling_treatment.step5.tb_positive_counseling.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step5.tb_positive_counseling.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step5.tb_positive_counseling.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + } + ] + }, + "step6": { + "title": "{{anc_counselling_treatment.step6.title}}", + "next": "step7", + "fields": [ + { + "key": "pe_risk_aspirin", + "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin.options.done.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "pe_risk_aspirin_notdone", + "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "no_stock", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.no_stock.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.no_stock.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "side_effects", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.side_effects.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.side_effects.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "allergy", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.allergy.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.allergy.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone.v_required.err}}" + }, + "relevance": { + "step6:pe_risk_aspirin": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "pe_risk_aspirin_notdone_other", + "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step6.pe_risk_aspirin_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step6:pe_risk_aspirin_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "pe_risk_aspirin_calcium", + "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.options.done.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_calcium.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_calcium.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "pe_risk_aspirin_calcium_notdone", + "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "no_stock", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.no_stock.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.no_stock.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "side_effects", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.side_effects.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.side_effects.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "allergy", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.allergy.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.allergy.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone.v_required.err}}" + }, + "relevance": { + "step6:pe_risk_aspirin_calcium": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "pe_risk_aspirin_calcium_notdone_other", + "openmrs_entity_parent": "165349AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step6.pe_risk_aspirin_calcium_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step6:pe_risk_aspirin_calcium_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "aspirin", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "hiv_risk_counsel", + "openmrs_entity_parent": "165351AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step6.hiv_risk_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step6.hiv_risk_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step6.hiv_risk_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step6.hiv_risk_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_risk_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step6.hiv_risk_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_risk_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "prep_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step6.prep_toaster.text}}", + "translation_text": "anc_counselling_treatment.step6.prep_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step6.prep_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step6.prep_toaster.toaster_info_title}}", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "hiv_prep", + "openmrs_entity_parent": "165335AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step6.hiv_prep.label}}", + "label_info_text": "{{anc_counselling_treatment.step6.hiv_prep.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step6.hiv_prep.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step6.hiv_prep.options.done.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_prep.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step6.hiv_prep.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_prep.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "hiv_prep_notdone", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165336AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "label": "{{anc_counselling_treatment.step6.hiv_prep_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "refered_instead", + "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.refered_instead.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_prep_notdone.options.refered_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no_drugs", + "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.no_drugs.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_prep_notdone.options.no_drugs.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "woman_refused", + "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.woman_refused.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_prep_notdone.options.woman_refused.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "127750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step6.hiv_prep_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step6.hiv_prep_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step6.hiv_prep_notdone.v_required.err}}" + }, + "relevance": { + "step6:hiv_prep": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "hiv_prep_notdone_other", + "openmrs_entity_parent": "165336AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step6.hiv_prep_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step6:hiv_prep_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "prep", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "gdm_risk_counsel", + "openmrs_entity_parent": "165337AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step6.gdm_risk_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step6.gdm_risk_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step6.gdm_risk_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step6.gdm_risk_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step6.gdm_risk_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step6.gdm_risk_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step6.gdm_risk_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + } + ] + }, + "step7": { + "title": "{{anc_counselling_treatment.step7.title}}", + "next": "step8", + "fields": [ + { + "key": "danger_signs_counsel", + "openmrs_entity_parent": "161068AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.danger_signs_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step7.danger_signs_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step7.danger_signs_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.danger_signs_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.danger_signs_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.danger_signs_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.danger_signs_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "emergency_hosp_counsel", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.emergency_hosp_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.emergency_hosp_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.emergency_hosp_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + } + ] + }, + { + "key": "anc_contact_counsel", + "openmrs_entity_parent": "161013AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.anc_contact_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step7.anc_contact_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step7.anc_contact_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.anc_contact_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.anc_contact_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.anc_contact_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.anc_contact_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "birth_prep_counsel", + "openmrs_entity_parent": "161069AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.birth_prep_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step7.birth_prep_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step7.birth_prep_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.birth_prep_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.birth_prep_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.birth_prep_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.birth_prep_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "birth_plan_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step7.birth_plan_toaster.text}}", + "translation_text": "anc_counselling_treatment.step7.birth_plan_toaster.text", + "toaster_type": "info", + "toaster_info_text": "{{anc_counselling_treatment.step7.birth_plan_toaster.toaster_info_text}}", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "delivery_place", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "159758AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.delivery_place.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "facility", + "text": "{{anc_counselling_treatment.step7.delivery_place.options.facility.text}}", + "translation_text": "anc_counselling_treatment.step7.delivery_place.options.facility.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1537AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "facility_elective", + "text": "{{anc_counselling_treatment.step7.delivery_place.options.facility_elective.text}}", + "translation_text": "anc_counselling_treatment.step7.delivery_place.options.facility_elective.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "155886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "home", + "text": "{{anc_counselling_treatment.step7.delivery_place.options.home.text}}", + "translation_text": "anc_counselling_treatment.step7.delivery_place.options.home.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1536AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step7.delivery_place.options.other.text}}", + "translation_text": "anc_counselling_treatment.step7.delivery_place.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "encourage_facility_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step7.encourage_facility_toaster.text}}", + "translation_text": "anc_counselling_treatment.step7.encourage_facility_toaster.text", + "toaster_type": "warning", + "relevance": { + "step7:delivery_place": { + "type": "string", + "ex": "equalTo(., \"home\")" + } + } + }, + { + "key": "rh_negative_counsel", + "openmrs_entity_parent": "165338AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.rh_negative_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step7.rh_negative_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step7.rh_negative_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.rh_negative_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.rh_negative_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.rh_negative_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.rh_negative_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "gbs_agent_counsel", + "openmrs_entity_parent": "165339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.gbs_agent_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step7.gbs_agent_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step7.gbs_agent_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.gbs_agent_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.gbs_agent_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.gbs_agent_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.gbs_agent_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "family_planning_counsel", + "openmrs_entity_parent": "165340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.family_planning_counsel.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.family_planning_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.family_planning_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step7.family_planning_counsel.v_required.err}}" + } + }, + { + "key": "family_planning_type", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.family_planning_type.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "none", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.none.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.none.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "cu_iud", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.cu_iud.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.cu_iud.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "lng_iud", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.lng_iud.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.lng_iud.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "etg_implant", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.etg_implant.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.etg_implant.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "lng_implant", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.lng_implant.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.lng_implant.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "dmpa_im", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.dmpa_im.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.dmpa_im.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "dmpa_sc", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.dmpa_sc.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.dmpa_sc.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "net_en", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.net_en.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.net_en.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "pop", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.pop.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.pop.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "coc", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.coc.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.coc.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "combined_patch", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.combined_patch.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.combined_patch.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "combined_ring", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.combined_ring.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.combined_ring.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "pvr", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.pvr.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.pvr.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "lam", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.lam.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.lam.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "male_condoms", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.male_condoms.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.male_condoms.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "female_condoms", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.female_condoms.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.female_condoms.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "male_sterilization", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.male_sterilization.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.male_sterilization.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "female_sterilization", + "text": "{{anc_counselling_treatment.step7.family_planning_type.options.female_sterilization.text}}", + "translation_text": "anc_counselling_treatment.step7.family_planning_type.options.female_sterilization.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "step7:family_planning_counsel": { + "type": "string", + "ex": "equalTo(., \"done\")" + } + } + }, + { + "key": "breastfeed_counsel", + "openmrs_entity_parent": "1910AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step7.breastfeed_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step7.breastfeed_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step7.breastfeed_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step7.breastfeed_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step7.breastfeed_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step7.breastfeed_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step7.breastfeed_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + } + ] + }, + "step8": { + "title": "{{anc_counselling_treatment.step8.title}}", + "next": "step9", + "fields": [ + { + "key": "ipv_support", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.ipv_support.label}}", + "label_info_text": "{{anc_counselling_treatment.step8.ipv_support.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step8.ipv_support.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step8.ipv_support.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_support.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step8.ipv_support.options.no.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_support.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step8.ipv_support.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ipv_support_notdone", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.ipv_support_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred", + "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.referred.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_support_notdone.options.referred.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "provider_unavailable", + "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.provider_unavailable.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_support_notdone.options.provider_unavailable.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "space_unavailable", + "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.space_unavailable.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_support_notdone.options.space_unavailable.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "confidentiality", + "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.confidentiality.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_support_notdone.options.confidentiality.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step8.ipv_support_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_support_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ipv_support_notdone_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step8.ipv_support_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step8:ipv_support_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "ipv_care", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step8.ipv_care.label}}", + "label_text_style": "bold", + "exclusive": [ + "no_action" + ], + "options": [ + { + "key": "no_action", + "text": "{{anc_counselling_treatment.step8.ipv_care.options.no_action.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_care.options.no_action.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "safety_assessment", + "text": "{{anc_counselling_treatment.step8.ipv_care.options.safety_assessment.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_care.options.safety_assessment.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "mental_health_care", + "text": "{{anc_counselling_treatment.step8.ipv_care.options.mental_health_care.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_care.options.mental_health_care.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "care_other_symptoms", + "text": "{{anc_counselling_treatment.step8.ipv_care.options.care_other_symptoms.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_care.options.care_other_symptoms.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "referred", + "text": "{{anc_counselling_treatment.step8.ipv_care.options.referred.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_care.options.referred.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "phys_violence_worse", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.phys_violence_worse.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step8.phys_violence_worse.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step8.phys_violence_worse.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step8.phys_violence_worse.options.no.text}}", + "translation_text": "anc_counselling_treatment.step8.phys_violence_worse.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "used_weapon", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.used_weapon.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step8.used_weapon.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step8.used_weapon.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step8.used_weapon.options.no.text}}", + "translation_text": "anc_counselling_treatment.step8.used_weapon.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "strangle", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.strangle.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step8.strangle.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step8.strangle.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step8.strangle.options.no.text}}", + "translation_text": "anc_counselling_treatment.step8.strangle.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "beaten", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.beaten.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step8.beaten.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step8.beaten.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step8.beaten.options.no.text}}", + "translation_text": "anc_counselling_treatment.step8.beaten.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "jealous", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.jealous.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step8.jealous.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step8.jealous.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step8.jealous.options.no.text}}", + "translation_text": "anc_counselling_treatment.step8.jealous.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "believe_kill", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step8.believe_kill.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_counselling_treatment.step8.believe_kill.options.yes.text}}", + "translation_text": "anc_counselling_treatment.step8.believe_kill.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_counselling_treatment.step8.believe_kill.options.no.text}}", + "translation_text": "anc_counselling_treatment.step8.believe_kill.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ipv_referrals", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step8.ipv_referrals.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "care_health_facility", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.care_health_facility.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.care_health_facility.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "crisis_intervention", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.crisis_intervention.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.crisis_intervention.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "police", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.police.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.police.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "shelter", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.shelter.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.shelter.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "legal_aid", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.legal_aid.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.legal_aid.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "child_protection", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.child_protection.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.child_protection.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "livelihood_support", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.livelihood_support.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.livelihood_support.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step8.ipv_referrals.options.other.text}}", + "translation_text": "anc_counselling_treatment.step8.ipv_referrals.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ipv_referrals_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step8.ipv_referrals_other.hint}}", + "edit_type": "name", + "relevance": { + "step8:ipv_referrals": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + } + ] + }, + "step9": { + "title": "{{anc_counselling_treatment.step9.title}}", + "next": "step10", + "fields": [ + { + "key": "ifa_high_prev", + "openmrs_entity_parent": "165355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step9.ifa_high_prev.label}}", + "label_info_text": "{{anc_counselling_treatment.step9.ifa_high_prev.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step9.ifa_high_prev.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step9.ifa_high_prev.options.done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_high_prev.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step9.ifa_high_prev.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_high_prev.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.ifa_high_prev.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ifa_high_prev_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", + "translation_text": "anc_counselling_treatment.step5.high_prev_allergy_toaster.text", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "ifa_high_prev_notdone", + "openmrs_entity_parent": "165355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.label}}", + "hint": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_high_prev_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_high_prev_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step9:ifa_high_prev": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + }, + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone.v_required.err}}" + } + }, + { + "key": "ifa_high_prev_notdone_other", + "openmrs_entity_parent": "165355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step9.ifa_high_prev_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step9:ifa_high_prev_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "ifa_low_prev", + "openmrs_entity_parent": "165356AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step9.ifa_low_prev.label}}", + "label_info_text": "{{anc_counselling_treatment.step9.ifa_low_prev.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step9.ifa_low_prev.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step9.ifa_low_prev.options.done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_low_prev.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step9.ifa_low_prev.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_low_prev.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.ifa_low_prev.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ifa_low_prev_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", + "translation_text": "anc_counselling_treatment.step5.high_prev_allergy_toaster.text", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "ifa_low_prev_notdone", + "openmrs_entity_parent": "165356AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.label}}", + "hint": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_low_prev_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_low_prev_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone.v_required.err}}" + }, + "relevance": { + "step9:ifa_low_prev": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "ifa_low_prev_notdone_other", + "openmrs_entity_parent": "165356AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step9.ifa_low_prev_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step9:ifa_low_prev_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "ifa_low_prev_prescribe_daily_dose", + "openmrs_entity_parent": "165355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step9.ifa_low_prev_prescribe_daily_dose.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step9.ifa_low_prev_prescribe_daily_dose.options.done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_low_prev_prescribe_daily_dose.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step9.ifa_low_prev_prescribe_daily_dose.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_low_prev_prescribe_daily_dose.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "" + } + ] + }, + { + "key": "ifa_weekly", + "openmrs_entity_parent": "165357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step9.ifa_weekly.label}}", + "label_info_text": "{{anc_counselling_treatment.step9.ifa_weekly.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step9.ifa_weekly.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step9.ifa_weekly.options.done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_weekly.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step9.ifa_weekly.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_weekly.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.ifa_weekly.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "ifa_weekly_notdone", + "openmrs_entity_parent": "165357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.label}}", + "hint": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_weekly_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step9.ifa_weekly_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.ifa_weekly_notdone.v_required.err}}" + }, + "relevance": { + "step9:ifa_weekly": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "ifa_weekly_notdone_other", + "openmrs_entity_parent": "165357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step9.ifa_weekly_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step9:ifa_weekly_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "ifa", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "calcium_supp", + "openmrs_entity_parent": "165350AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step9.calcium_supp.label}}", + "label_info_text": "{{anc_counselling_treatment.step9.calcium_supp.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step9.calcium_supp.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step9.calcium_supp.options.done.text}}", + "translation_text": "anc_counselling_treatment.step9.calcium_supp.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step9.calcium_supp.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step9.calcium_supp.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.calcium_supp.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "calcium_supp_notdone", + "openmrs_entity_parent": "165350AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step9.calcium_supp_notdone.label}}", + "hint": "{{anc_counselling_treatment.step9.calcium_supp_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step9.calcium_supp_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step9.calcium_supp_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step9.calcium_supp_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step9.calcium_supp_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step9:calcium_supp": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + }, + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.calcium_supp_notdone.v_required.err}}" + } + }, + { + "key": "calcium_supp_notdone_other", + "openmrs_entity_parent": "165350AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step9.calcium_supp_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step9:calcium_supp_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "calcium", + "type": "hidden", + "label_text_style": "bold", + "text": "{{anc_counselling_treatment.step9.calcium.text}}", + "translation_text": "anc_counselling_treatment.step9.calcium.text", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "vita_supp", + "openmrs_entity_parent": "164804AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step9.vita_supp.label}}", + "label_info_text": "{{anc_counselling_treatment.step9.vita_supp.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step9.vita_supp.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step9.vita_supp.options.done.text}}", + "translation_text": "anc_counselling_treatment.step9.vita_supp.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step9.vita_supp.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step9.vita_supp.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.vita_supp.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "vita_supp_notdone", + "openmrs_entity_parent": "164804AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "check_box", + "label": "{{anc_counselling_treatment.step9.vita_supp_notdone.label}}", + "hint": "{{anc_counselling_treatment.step9.vita_supp_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step9.vita_supp_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step9.vita_supp_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step9.vita_supp_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step9.vita_supp_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step9.vita_supp_notdone.v_required.err}}" + }, + "relevance": { + "step9:vita_supp": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "vita_supp_notdone_other", + "openmrs_entity_parent": "164804AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step9.vita_supp_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step9:vita_supp_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "vita", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + } + ] + }, + "step10": { + "title": "{{anc_counselling_treatment.step10.title}}", + "next": "step11", + "fields": [ + { + "key": "deworm", + "openmrs_entity_parent": "159922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step10.deworm.label}}", + "label_info_text": "{{anc_counselling_treatment.step10.deworm.label_info_text}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step10.deworm.options.done.text}}", + "translation_text": "anc_counselling_treatment.step10.deworm.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step10.deworm.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step10.deworm.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step10.deworm.v_required.err}}" + } + }, + { + "key": "deworm_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step5.high_prev_allergy_toaster.text}}", + "translation_text": "anc_counselling_treatment.step5.high_prev_allergy_toaster.text", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "deworm_notdone", + "openmrs_entity_parent": "159922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165346AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step10.deworm_notdone.label}}", + "hint": "{{anc_counselling_treatment.step10.deworm_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step10.deworm_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step10.deworm_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step10.deworm_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step10.deworm_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step10.deworm_notdone.v_required.err}}" + }, + "relevance": { + "step10:deworm": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "deworm_notdone_other", + "openmrs_entity_parent": "159922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step10.deworm_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step10:deworm_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "alben_meben", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "iptp_sp1", + "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step10.iptp_sp1.label}}", + "label_info_text": "{{anc_counselling_treatment.step10.iptp_sp1.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step10.iptp_sp1.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step10.iptp_sp1.options.done.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp1.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step10.iptp_sp1.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp1.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step10.iptp_sp1.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "iptp_sp1_dose_number", + "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165358AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "iptp_sp2", + "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step10.iptp_sp2.label}}", + "label_info_text": "{{anc_counselling_treatment.step10.iptp_sp2.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step10.iptp_sp2.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step10.iptp_sp2.options.done.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp2.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step10.iptp_sp2.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp2.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step10.iptp_sp2.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "iptp_sp2_dose_number", + "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165358AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "iptp_sp3", + "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165345AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step10.iptp_sp3.label}}", + "label_info_text": "{{anc_counselling_treatment.step10.iptp_sp3.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step10.iptp_sp3.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step10.iptp_sp3.options.done.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp3.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step10.iptp_sp3.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp3.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step10.iptp_sp3.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "iptp_sp3_dose_number", + "openmrs_entity_parent": "1591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165358AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "iptp_sp_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step10.iptp_sp_toaster.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step10.iptp_sp_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_counselling_treatment.step10.iptp_sp_toaster.toaster_info_title}}", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "iptp_sp_notdone", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165359AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "label": "{{anc_counselling_treatment.step10.iptp_sp_notdone.label}}", + "hint": "{{anc_counselling_treatment.step10.iptp_sp_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "stock_out", + "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.stock_out.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp_notdone.options.stock_out.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "expired", + "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.expired.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp_notdone.options.expired.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step10.iptp_sp_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step10.iptp_sp_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "iptp_sp_notdone_other", + "openmrs_entity_parent": "165359AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step10.iptp_sp_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step10:iptp_sp_notdone": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "sp", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "malaria_counsel", + "openmrs_entity_parent": "164884AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165310AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step10.malaria_counsel.label}}", + "label_info_text": "{{anc_counselling_treatment.step10.malaria_counsel.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step10.malaria_counsel.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done", + "text": "{{anc_counselling_treatment.step10.malaria_counsel.options.done.text}}", + "translation_text": "anc_counselling_treatment.step10.malaria_counsel.options.done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step10.malaria_counsel.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step10.malaria_counsel.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "malaria_counsel_notdone", + "openmrs_entity_parent": "164884AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.label}}", + "hint": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.hint}}", + "label_text_style": "bold", + "options": [ + { + "key": "referred_instead", + "text": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.options.referred_instead.text}}", + "translation_text": "anc_counselling_treatment.step10.malaria_counsel_notdone.options.referred_instead.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step10.malaria_counsel_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step10.malaria_counsel_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "step10:malaria_counsel": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "malaria_counsel_notdone_other", + "openmrs_entity_parent": "164884AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165426AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step10.malaria_counsel_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step10:malaria_counsel_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + } + ] + }, + "step11": { + "title": "{{anc_counselling_treatment.step11.title}}", + "next": "step12", + "fields": [ + { + "key": "tt1_date", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step11.tt1_date.label}}", + "label_info_text": "{{anc_counselling_treatment.step11.tt1_date.label_info_text}}", + "label_text_style": "bold", + "options": [ + { + "key": "done_today", + "text": "{{anc_counselling_treatment.step11.tt1_date.options.done_today.text}}", + "translation_text": "anc_counselling_treatment.step11.tt1_date.options.done_today.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "done_earlier", + "text": "{{anc_counselling_treatment.step11.tt1_date.options.done_earlier.text}}", + "translation_text": "anc_counselling_treatment.step11.tt1_date.options.done_earlier.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160699AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step11.tt1_date.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step11.tt1_date.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165228AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step11.tt1_date.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "tt1_dose_number", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "tt1_date_done_date_today_hidden", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "tt1_date_done", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "date_picker", + "hint": "{{anc_counselling_treatment.step11.tt1_date_done.hint}}", + "expanded": "false", + "max_date": "today", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step11.tt1_date_done.v_required.err}}" + } + }, + { + "key": "tt2_date", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step11.tt2_date.label}}", + "label_info_text": "{{anc_counselling_treatment.step11.tt2_date.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step11.tt2_date.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done_today", + "text": "{{anc_counselling_treatment.step11.tt2_date.options.done_today.text}}", + "translation_text": "anc_counselling_treatment.step11.tt2_date.options.done_today.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "done_earlier", + "text": "{{anc_counselling_treatment.step11.tt2_date.options.done_earlier.text}}", + "translation_text": "anc_counselling_treatment.step11.tt2_date.options.done_earlier.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160699AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step11.tt2_date.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step11.tt2_date.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165228AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step11.tt2_date.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "tt2_dose_number", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "tt2_date_done_date_today_hidden", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "tt2_date_done", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "date_picker", + "hint": "{{anc_counselling_treatment.step11.tt2_date_done.hint}}", + "expanded": "false", + "max_date": "today", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + }, + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step11.tt2_date_done.v_required.err}}" + } + }, + { + "key": "tt_dose_notdone", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step11.tt_dose_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "vaccine_available", + "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.vaccine_available.text}}", + "translation_text": "anc_counselling_treatment.step11.tt_dose_notdone.options.vaccine_available.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "woman_is_ill", + "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.woman_is_ill.text}}", + "translation_text": "anc_counselling_treatment.step11.tt_dose_notdone.options.woman_is_ill.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160585AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "woman_refused", + "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.woman_refused.text}}", + "translation_text": "anc_counselling_treatment.step11.tt_dose_notdone.options.woman_refused.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "127750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "allergies", + "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.allergies.text}}", + "translation_text": "anc_counselling_treatment.step11.tt_dose_notdone.options.allergies.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step11.tt_dose_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step11.tt_dose_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step11.tt_dose_notdone.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "tt_dose_notdone_other", + "openmrs_entity_parent": "84879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step11.tt_dose_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step11:tt_dose_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "flu_date", + "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step11.flu_date.label}}", + "label_info_text": "{{anc_counselling_treatment.step11.flu_date.label_info_text}}", + "label_info_title": "{{anc_counselling_treatment.step11.flu_date.label_info_title}}", + "label_text_style": "bold", + "options": [ + { + "key": "done_today", + "text": "{{anc_counselling_treatment.step11.flu_date.options.done_today.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_date.options.done_today.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "done_earlier", + "text": "{{anc_counselling_treatment.step11.flu_date.options.done_earlier.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_date.options.done_earlier.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160699AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{anc_counselling_treatment.step11.flu_date.options.not_done.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_date.options.not_done.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165228AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step11.flu_date.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "flu_date_done_date_today_hidden", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_calculation_rules.yml" + } + } + } + }, + { + "key": "flu_date_done", + "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "date_picker", + "hint": "{{anc_counselling_treatment.step11.flu_date_done.hint}}", + "expanded": "false", + "max_date": "today", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + }, + { + "key": "flu_dose_notdone", + "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_counselling_treatment.step11.flu_dose_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "vaccine_available", + "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.vaccine_available.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_dose_notdone.options.vaccine_available.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1754AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "woman_is_ill", + "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.woman_is_ill.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_dose_notdone.options.woman_is_ill.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160585AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "woman_refused", + "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.woman_refused.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_dose_notdone.options.woman_refused.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "127750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "allergies", + "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.allergies.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_dose_notdone.options.allergies.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "141760AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_counselling_treatment.step11.flu_dose_notdone.options.other.text}}", + "translation_text": "anc_counselling_treatment.step11.flu_dose_notdone.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_counselling_treatment.step11.flu_dose_notdone.v_required.err}}" + }, + "relevance": { + "step11:flu_date": { + "type": "string", + "ex": "equalTo(., \"not_done\")" + } + } + }, + { + "key": "flu_dose_notdone_other", + "openmrs_entity_parent": "78032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_counselling_treatment.step11.flu_dose_notdone_other.hint}}", + "edit_type": "name", + "relevance": { + "step11:flu_dose_notdone": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "woman_immunised_flu_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step11.woman_immunised_flu_toaster.text}}", + "translation_text": "anc_counselling_treatment.step11.woman_immunised_flu_toaster.text", + "toaster_type": "positive", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ct_relevance_rules.yml" + } + } + } + } + ] + }, + "step12": { + "title": "{{anc_counselling_treatment.step12.title}}", + "fields": [ + { + "key": "prep_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_counselling_treatment.step12.prep_toaster.text}}", + "translation_text": "anc_counselling_treatment.step12.prep_toaster.text", + "toaster_info_text": "{{anc_counselling_treatment.step12.prep_toaster.toaster_info_text}}", + "toaster_type": "info" + } + ] + }, + "properties_file_name": "anc_counselling_treatment" } diff --git a/opensrp-anc/src/main/assets/json.form/anc_physical_exam.json b/opensrp-anc/src/main/assets/json.form/anc_physical_exam.json index fb0d0ca6a..ff52e6961 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_physical_exam.json +++ b/opensrp-anc/src/main/assets/json.form/anc_physical_exam.json @@ -1,2759 +1,3331 @@ { - "validate_on_submit": true, - "display_scroll_bars": true, - "count": "4", - "encounter_type": "Physical Exam", - "entity_id": "", - "relational_id": "", - "form_version": "0.0.1", - "default_values": [ - "height", - "pregest_weight", - "pregest_weight_unknown", - "first_weight", - "no_of_fetuses_unknown", - "no_of_fetuses", - "ipv_physical_signs_symptoms" - ], - "global_previous": [ - "current_weight" - ], - "editable_fields": [ - "height", - "pregest_weight", - "pregest_weight_unknown", - "first_weight", - "no_of_fetuses_unknown", - "no_of_fetuses" - ], - "metadata": { - "start": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "start", - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "end": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "end", - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "today": { - "openmrs_entity_parent": "", - "openmrs_entity": "encounter", - "openmrs_entity_id": "encounter_date" - }, - "deviceid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "deviceid", - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "subscriberid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "subscriberid", - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "simserial": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "simserial", - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "phonenumber": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "phonenumber", - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "encounter_location": "", - "look_up": { - "entity_id": "", - "value": "" - } - }, - "step1": { - "title": "{{anc_physical_exam.step1.title}}", - "next": "step2", - "fields": [ - { - "key": "height_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step1.height_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - } - }, - { - "key": "height", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step1.height.v_required.err}}" - }, - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "100", - "err": "Height must be equal or greater than 100" - }, - "v_max": { - "value": "200", - "err": "Height must be equal or less than 200" - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "pregest_weight_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step1.pregest_weight_label.text}}", - "text_color": "#000000", - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step1.pregest_weight_label.v_required.err}}" - }, - "relevance": { - "step1:pregest_weight_unknown": { - "ex-checkbox": [ - { - "not": [ - "pregest_weight_unknown" - ] - } - ] - } - } - }, - { - "key": "pregest_weight", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165275AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "relevance": { - "step1:pregest_weight_unknown": { - "ex-checkbox": [ - { - "not": [ - "pregest_weight_unknown" - ] - } - ] - } - }, - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "30", - "err": "Weight must be equal or greater than 30" - }, - "v_max": { - "value": "180", - "err": "Weight must be equal or less than 180" - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step1.pregest_weight.v_required.err}}" - } - }, - { - "key": "pregest_weight_unknown", - "openmrs_entity_parent": "165277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "options": [ - { - "key": "pregest_weight_unknown", - "text": "{{anc_physical_exam.step1.pregest_weight_unknown.options.pregest_weight_unknown.text}}", - "value": "false", - "openmrs_entity_parent": "165277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "current_weight_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step1.current_weight_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - } - }, - { - "key": "current_weight", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "30", - "err": "Weight must be equal or greater than 30" - }, - "v_max": { - "value": "180", - "err": "Weight must be equal or less than 180" - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step1.current_weight.v_required.err}}" - } - }, - { - "key": "first_weight", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "bmi", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "gdm_risk", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "weight_cat", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "exp_weight_gain", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "weight_gain_duration", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "weight_gain", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "tot_weight_gain", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster1", - "openmrs_entity_parent": "", - "openmrs_entity": "Body mass Index", - "openmrs_entity_id": "1432", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step1.toaster1.text}}", - "text_color": "#1199F9", - "toaster_type": "info", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster2", - "openmrs_entity_parent": "", - "openmrs_entity": "Weight gain finding", - "openmrs_entity_id": "122887", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step1.toaster2.text}}", - "text_color": "#1199F9", - "toaster_type": "info", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster3", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step1.toaster3.text}}", - "text_color": "#D56900", - "toaster_info_text": "{{anc_physical_exam.step1.toaster3.toaster_info_text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster4", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step1.toaster4.text}}", - "text_color": "#1199F9", - "toaster_type": "info", - "toaster_info_text": "{{anc_physical_exam.step1.toaster4.toaster_info_text}}", - "toaster_info_title": "{{anc_physical_exam.step1.toaster4.toaster_info_title}}" - }, - { - "key": "toaster5", - "openmrs_entity_parent": "", - "openmrs_entity": "Weight gain finding", - "openmrs_entity_id": "122887", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step1.toaster5.text}}", - "text_color": "#1199F9", - "toaster_type": "info", - "toaster_info_text": "{{anc_physical_exam.step1.toaster5.toaster_info_text}}", - "toaster_info_title": "{{anc_physical_exam.step1.toaster5.toaster_info_title}}", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster6", - "openmrs_entity_parent": "", - "openmrs_entity": "Weight gain finding", - "openmrs_entity_id": "122887", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step1.toaster6.text}}", - "text_color": "#1199F9", - "toaster_type": "info", - "toaster_info_text": "{{anc_physical_exam.step1.toaster6.toaster_info_text}}", - "toaster_info_title": "{{anc_physical_exam.step1.toaster6.toaster_info_title}}", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - } - ] - }, - "step2": { - "title": "{{anc_physical_exam.step2.title}}", - "next": "step3", - "fields": [ - { - "key": "bp_systolic_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step2.bp_systolic_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "step2:cant_record_bp": { - "ex-checkbox": [ - { - "not": [ - "cant_record_bp" - ] - } - ] - } - } - }, - { - "key": "bp_systolic", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "20", - "err": "SBP must be equal or greater than 20" - }, - "v_max": { - "value": "260", - "err": "SBP must be equal or less than 260" - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step2.bp_systolic.v_required.err}}" - }, - "relevance": { - "step2:cant_record_bp": { - "ex-checkbox": [ - { - "not": [ - "cant_record_bp" - ] - } - ] - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp", - "relevance": { - "step2:cant_record_bp": { - "ex-checkbox": [ - { - "not": [ - "cant_record_bp" - ] - } - ] - } - } - }, - { - "key": "bp_diastolic_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step2.bp_diastolic_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "step2:cant_record_bp": { - "ex-checkbox": [ - { - "not": [ - "cant_record_bp" - ] - } - ] - } - } - }, - { - "key": "bp_diastolic", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "20", - "err": "DBP must be equal to or greater than 20" - }, - "v_max": { - "value": "260", - "err": "DBP must be equal to or less than 260" - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step2.bp_diastolic.v_required.err}}" - }, - "relevance": { - "step2:cant_record_bp": { - "ex-checkbox": [ - { - "not": [ - "cant_record_bp" - ] - } - ] - } - } - }, - { - "key": "cant_record_bp", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "options": [ - { - "key": "cant_record_bp", - "text": "{{anc_physical_exam.step2.cant_record_bp.options.cant_record_bp.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - } - ] - }, - { - "key": "cant_record_bp_reason", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165428AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "label": "{{anc_physical_exam.step2.cant_record_bp_reason.label}}", - "type": "check_box", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "bp_cuff_unavailable", - "text": "{{anc_physical_exam.step2.cant_record_bp_reason.options.bp_cuff_unavailable.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165386AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "bp_cuff_broken", - "text": "{{anc_physical_exam.step2.cant_record_bp_reason.options.bp_cuff_broken.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165179AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_physical_exam.step2.cant_record_bp_reason.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step2.cant_record_bp_reason.v_required.err}}" - }, - "relevance": { - "step2:cant_record_bp": { - "ex-checkbox": [ - { - "or": [ - "cant_record_bp" - ] - } - ] - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "toaster7", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step2.toaster7.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "bp_systolic_repeat_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step2.bp_systolic_repeat_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "bp_systolic_repeat", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165278AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "20", - "err": "SBP must be equal or greater than 20" - }, - "v_max": { - "value": "260", - "err": "SBP must be equal or less than 260" - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step2.bp_systolic_repeat.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "bp_diastolic_repeat_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step2.bp_diastolic_repeat_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "bp_diastolic_repeat", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165279AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "20", - "err": "DBP must be equal or greater than 20" - }, - "v_max": { - "value": "260", - "err": "DBP must be equal or less than 260" - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step2.bp_diastolic_repeat.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster8", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step2.toaster8.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "symp_sev_preeclampsia", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165280AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_physical_exam.step2.symp_sev_preeclampsia.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_physical_exam.step2.symp_sev_preeclampsia.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "severe_headache", - "text": "{{anc_physical_exam.step2.symp_sev_preeclampsia.options.severe_headache.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "139081AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "visual_disturbance", - "text": "{{anc_physical_exam.step2.symp_sev_preeclampsia.options.visual_disturbance.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "147104AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "epigastric_pain", - "text": "{{anc_physical_exam.step2.symp_sev_preeclampsia.options.epigastric_pain.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "141128AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "dizziness", - "text": "{{anc_physical_exam.step2.symp_sev_preeclampsia.options.dizziness.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "156046AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "vomiting", - "text": "{{anc_physical_exam.step2.symp_sev_preeclampsia.options.vomiting.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "122983AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step2.symp_sev_preeclampsia.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "urine_protein", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step2.urine_protein.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "none", - "text": "{{anc_physical_exam.step2.urine_protein.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "+", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_one.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "++", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_two.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "+++", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_three.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "++++", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_four.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step2.urine_protein.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "hypertension", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "47AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "severe_hypertension", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165205AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster9", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step2.toaster9.text}}", - "toaster_info_text": "{{anc_physical_exam.step2.toaster9.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster10", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step2.toaster10.text}}", - "toaster_info_text": "{{anc_physical_exam.step2.toaster10.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster11", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step2.toaster11.text}}", - "toaster_info_text": "{{anc_physical_exam.step2.toaster11.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "severe_preeclampsia", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "113006AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster13", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step2.toaster13.text}}", - "toaster_info_text": "{{anc_physical_exam.step2.toaster13.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "preeclampsia", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "129251AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster14", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step2.toaster14.text}}", - "toaster_info_text": "{{anc_physical_exam.step2.toaster14.toaster_info_text}}", - "toaster_info_title": "{{anc_physical_exam.step2.toaster14.toaster_info_title}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - } - ] - }, - "step3": { - "title": "{{anc_physical_exam.step3.title}}", - "next": "step4", - "fields": [ - { - "key": "body_temp_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step3.body_temp_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - } - }, - { - "key": "body_temp", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step3.body_temp.v_required.err}}" - }, - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "35", - "err": "Temperature must be equal to or greater than 35" - }, - "v_max": { - "value": "42", - "err": "Temperature must be equal to or less than 42" - } - }, - { - "key": "toaster15", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster15.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step3:body_temp": { - "type": "numeric", - "ex": "greaterThanEqualTo(., \"38\")" - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "body_temp_repeat_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step3.body_temp_repeat_label.text}}", - "text_color": "#000000", - "label_info_text": "Retake the woman\u0027s temperature if the first reading was 38ºC or higher.", - "v_required": { - "value": true - }, - "relevance": { - "step3:body_temp": { - "type": "numeric", - "ex": "greaterThanEqualTo(., \"38\")" - } - } - }, - { - "key": "body_temp_repeat", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step3.body_temp_repeat.v_required.err}}" - }, - "relevance": { - "step3:body_temp": { - "type": "numeric", - "ex": "greaterThanEqualTo(., \"38\")" - } - }, - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "35", - "err": "Temperature must be equal to or greater than 35" - }, - "v_max": { - "value": "42", - "err": "Temperature must be equal to or less than 42" - } - }, - { - "key": "toaster16", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster16.text}}", - "toaster_info_text": "{{anc_physical_exam.step3.toaster16.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "step3:body_temp_repeat": { - "type": "numeric", - "ex": "greaterThanEqualTo(., \"38\")" - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "pulse_rate_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step3.pulse_rate_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - } - }, - { - "key": "pulse_rate", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step3.pulse_rate.v_required.err}}" - }, - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "20", - "err": "Pulse rate must be equal to or greater than 20" - }, - "v_max": { - "value": "200", - "err": "Pulse rate must be equal to or less than 200" - } - }, - { - "key": "toaster17", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster17.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "pulse_rate_repeat_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step3.pulse_rate_repeat_label.text}}", - "label_info_text": "Retake the woman\u0027s pulse rate if the first reading was lower than 60 or higher than 100.", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "pulse_rate_repeat", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_numeric": { - "value": "true", - "err": "" - }, - "v_min": { - "value": "20", - "err": "Pulse rate must be equal to or greater than 20" - }, - "v_max": { - "value": "200", - "err": "Pulse rate must be equal to or less than 200" - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step3.pulse_rate_repeat.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster18", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster18.text}}", - "toaster_info_text": "{{anc_physical_exam.step3.toaster18.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "pallor", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5245AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.pallor.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_physical_exam.step3.pallor.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_physical_exam.step3.pallor.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "anaemic", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "121629AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster19", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster19.text}}", - "toaster_info_text": "{{anc_physical_exam.step3.toaster19.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "respiratory_exam", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.respiratory_exam.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "extra_rel": true, - "has_extra_rel": "3", - "options": [ - { - "key": "1", - "text": "{{anc_physical_exam.step3.respiratory_exam.options.1.text}}", - "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "2", - "text": "{{anc_physical_exam.step3.respiratory_exam.options.2.text}}", - "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "3", - "text": "{{anc_physical_exam.step3.respiratory_exam.options.3.text}}", - "specify_info": "specify...", - "specify_widget": "check_box", - "specify_info_color": "#8C8C8C", - "content_form": "respiratory_exam_sub_form", - "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "toaster20", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster20.text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "step3:respiratory_exam": { - "type": "string", - "ex": "equalTo(., \"3\")" - } - } - }, - { - "key": "oximetry_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step3.oximetry_label.text}}", - "text_color": "#000000", - "relevance": { - "step3:respiratory_exam": { - "type": "string", - "ex": "equalTo(., \"3\")" - } - } - }, - { - "key": "oximetry", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "relevance": { - "step3:respiratory_exam": { - "type": "string", - "ex": "equalTo(., \"3\")" - } - } - }, - { - "key": "toaster21", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster21.text}}", - "toaster_info_text": "{{anc_physical_exam.step3.toaster21.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "cardiac_exam", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.cardiac_exam.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "extra_rel": true, - "has_extra_rel": "3", - "options": [ - { - "key": "1", - "text": "{{anc_physical_exam.step3.cardiac_exam.options.1.text}}", - "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "2", - "text": "{{anc_physical_exam.step3.cardiac_exam.options.2.text}}", - "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "3", - "text": "{{anc_physical_exam.step3.cardiac_exam.options.3.text}}", - "specify_info": "specify...", - "specify_widget": "check_box", - "specify_info_color": "#8C8C8C", - "content_form": "cardiac_exam_sub_form", - "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "toaster22", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster22.text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "breast_exam", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.breast_exam.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "extra_rel": true, - "has_extra_rel": "3", - "options": [ - { - "key": "1", - "text": "{{anc_physical_exam.step3.breast_exam.options.1.text}}", - "openmrs_entity_parent": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "2", - "text": "{{anc_physical_exam.step3.breast_exam.options.2.text}}", - "openmrs_entity_parent": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "3", - "text": "{{anc_physical_exam.step3.breast_exam.options.3.text}}", - "specify_info": "specify...", - "specify_widget": "check_box", - "specify_info_color": "#8C8C8C", - "content_form": "breast_exam_sub_form", - "openmrs_entity_parent": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "toaster23", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster23.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "abdominal_exam", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.abdominal_exam.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "extra_rel": true, - "has_extra_rel": "3", - "options": [ - { - "key": "1", - "text": "{{anc_physical_exam.step3.abdominal_exam.options.1.text}}", - "openmrs_entity_parent": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "2", - "text": "{{anc_physical_exam.step3.abdominal_exam.options.2.text}}", - "openmrs_entity_parent": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "3", - "text": "{{anc_physical_exam.step3.abdominal_exam.options.3.text}}", - "specify_info": "specify...", - "specify_widget": "check_box", - "specify_info_color": "#8C8C8C", - "content_form": "abdominal_exam_sub_form", - "openmrs_entity_parent": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "toaster24", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster24.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "pelvic_exam", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.pelvic_exam.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "extra_rel": true, - "has_extra_rel": "3", - "options": [ - { - "key": "1", - "text": "{{anc_physical_exam.step3.pelvic_exam.options.1.text}}", - "openmrs_entity_parent": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "2", - "text": "{{anc_physical_exam.step3.pelvic_exam.options.2.text}}", - "openmrs_entity_parent": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "3", - "text": "{{anc_physical_exam.step3.pelvic_exam.options.3.text}}", - "specify_info": "specify...", - "specify_widget": "check_box", - "specify_info_color": "#8C8C8C", - "content_form": "pelvic_exam_sub_form", - "openmrs_entity_parent": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "toaster25", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster25.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "cervical_exam", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.cervical_exam.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "extra_rel": true, - "has_extra_rel": "1", - "options": [ - { - "key": "1", - "text": "{{anc_physical_exam.step3.cervical_exam.options.1.text}}", - "openmrs_entity_parent": "165374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "", - "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "specify_info": "specify cm cervix dilated...", - "specify_widget": "normal_edit_text", - "specify_info_color": "#8C8C8C", - "secondary_suffix": "cm", - "content_form": "cervical_exam_sub_form" - }, - { - "key": "2", - "text": "{{anc_physical_exam.step3.cervical_exam.options.2.text}}", - "openmrs_entity_parent": "165374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "toaster26_hidden", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - }, - "src": { - "key": "cervical_exam", - "option_key": "1", - "stepName": "step3" - } - } - }, - { - "key": "toaster26", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster26.text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "oedema", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.oedema.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "extra_rel": true, - "has_extra_rel": "yes", - "options": [ - { - "key": "yes", - "text": "{{anc_physical_exam.step3.oedema.options.yes.text}}", - "specify_info": "specify type...", - "specify_widget": "radio_button", - "specify_info_color": "#8C8C8C", - "content_form": "oedema_present_sub_form", - "openmrs_entity_parent": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_physical_exam.step3.oedema.options.no.text}}", - "openmrs_entity_parent": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "oedema_severity", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.oedema_severity.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "+", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_one.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "++", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_two.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "+++", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_three.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "++++", - "text": "{{anc_physical_exam.step2.urine_protein.options.plus_four.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": "false", - "err": "{{anc_physical_exam.step3.oedema_severity.v_required.err}}" - }, - "relevance": { - "step3:oedema": { - "type": "string", - "ex": "equalTo(., \"yes\")" - } - } - }, - { - "key": "ipv_physical_signs_symptoms", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms.label}}", - "label_info_text": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms.label_info_text}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "abdomen_injury", - "text": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms.options.abdomen_injury.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "other_injury", - "text": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms.options.other_injury.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "other", - "text": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms.options.other.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "ipv_physical_signs_symptoms_injury_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms_injury_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:ipv_physical_signs_symptoms": { - "ex-checkbox": [ - { - "or": [ - "other_injury" - ] - } - ] - } - } - }, - { - "key": "ipv_physical_signs_symptoms_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_physical_exam.step3.ipv_physical_signs_symptoms_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:ipv_physical_signs_symptoms": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "ipv_suspect", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster31", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step3.toaster31.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "ipv_clinical_enquiry", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.ipv_clinical_enquiry.label}}", - "label_info_text": "{{anc_physical_exam.step3.ipv_clinical_enquiry.label_info_text}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_physical_exam.step3.ipv_clinical_enquiry.options.yes.text}}", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "no", - "text": "{{anc_physical_exam.step3.ipv_clinical_enquiry.options.no.text}}", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "ipv_clinical_enquiry_not_done_reason", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.ipv_clinical_enquiry_not_done_reason.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "referred", - "text": "{{anc_physical_exam.step3.ipv_clinical_enquiry_not_done_reason.options.referred.text}}", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "provider_unavailable", - "text": "{{anc_physical_exam.step3.ipv_clinical_enquiry_not_done_reason.options.provider_unavailable.text}}", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "space_unavailable", - "text": "{{anc_physical_exam.step3.ipv_clinical_enquiry_not_done_reason.options.space_unavailable.text}}", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "confidentiality", - "text": "{{anc_physical_exam.step3.ipv_clinical_enquiry_not_done_reason.options.confidentiality.text}}", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "other", - "text": "{{anc_physical_exam.step3.ipv_clinical_enquiry_not_done_reason.options.other.text}}", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "ipv_clinical_enquiry_not_done_reason_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_physical_exam.step3.ipv_clinical_enquiry_not_done_reason_other.hint}}", - "edit_type": "name", - "relevance": { - "step3:ipv_clinical_enquiry_not_done_reason": { - "type": "string", - "ex": "equalTo(., \"other\")" - } - } - }, - { - "key": "ipv_subject", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_physical_exam.step3.ipv_subject.label}}", - "label_info_text": "{{anc_physical_exam.step3.ipv_subject.label_info_text}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_physical_exam.step3.ipv_subject.options.yes.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "no", - "text": "{{anc_physical_exam.step3.ipv_subject.options.no.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step3.ipv_subject.v_required.err}}" - } - }, - { - "key": "ipv_subject_violence_types", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_physical_exam.step3.ipv_subject_violence_types.label}}", - "label_info_text": "{{anc_physical_exam.step3.ipv_subject_violence_types.label_info_text}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "phys_violence", - "text": "{{anc_physical_exam.step3.ipv_subject_violence_types.options.phys_violence.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "sexual_violence", - "text": "{{anc_physical_exam.step3.ipv_subject_violence_types.options.sexual_violence.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "emotional_abuse", - "text": "{{anc_physical_exam.step3.ipv_subject_violence_types.options.emotional_abuse.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "family_member_violence", - "text": "{{anc_physical_exam.step3.ipv_subject_violence_types.options.family_member_violence.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - } - ] - }, - "step4": { - "title": "{{anc_physical_exam.step4.title}}", - "fields": [ - { - "key": "sfh_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step4.sfh_label.text}}", - "text_color": "#000000", - "v_required": { - "value": false - } - }, - { - "key": "sfh", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_min": { - "value": "0.1", - "err": "SFH must be greater than 0" - }, - "v_max": { - "value": "44", - "err": "SFH must be less than or equal to 44" - }, - "v_numeric_integer": { - "value": "true", - "err": "Enter a valid sfh" - }, - "v_required": { - "value": "false", - "err": "{{anc_physical_exam.step4.sfh.v_required.err}}" - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "fetal_movement", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165376AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step4.fetal_movement.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_physical_exam.step4.fetal_movement.options.yes.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "165376AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_physical_exam.step4.fetal_movement.options.no.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "165376AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": "false", - "err": "{{anc_physical_exam.step4.fetal_movement.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "fetal_heartbeat", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step4.fetal_heartbeat.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_physical_exam.step4.fetal_heartbeat.options.yes.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "165377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_physical_exam.step4.fetal_heartbeat.options.no.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "165377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step4.fetal_heartbeat.v_required.err}}" - } - }, - { - "key": "fetal_heart_rate_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step4.fetal_heart_rate_label.text}}", - "text_color": "#000000", - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step4.fetal_heart_rate_label.v_required.err}}" - }, - "relevance": { - "step4:fetal_heartbeat": { - "type": "string", - "ex": "equalTo(., \"yes\")" - } - } - }, - { - "key": "fetal_heart_rate", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_min": { - "value": "80", - "err": "Fetal heartbeat must be equal or greater than 80" - }, - "v_max": { - "value": "200", - "err": "Fetal heartbeat must be less than or equal to 200" - }, - "v_numeric_integer": { - "value": "true", - "err": "Enter a valid number" - }, - "relevance": { - "step4:fetal_heartbeat": { - "type": "string", - "ex": "equalTo(., \"yes\")" - } - }, - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step4.fetal_heart_rate.v_required.err}}" - } - }, - { - "key": "toaster27", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step4.toaster27.text}}", - "toaster_info_text": "{{anc_physical_exam.step4.toaster27.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster28", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step4.toaster28.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "fetal_heart_rate_repeat_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step4.fetal_heart_rate_repeat_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "fetal_heart_rate_repeat", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "edit_type": "number", - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step4.fetal_heart_rate_repeat.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "toaster29", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step4.toaster29.text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "no_of_fetuses_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_physical_exam.step4.no_of_fetuses_label.text}}", - "text_color": "#000000", - "v_required": { - "value": false - }, - "relevance": { - "step4:no_of_fetuses_unknown": { - "ex-checkbox": [ - { - "not": [ - "no_of_fetuses_unknown" - ] - } - ] - } - } - }, - { - "key": "no_of_fetuses", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165293AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "numbers_selector", - "number_of_selectors": "5", - "start_number": "1", - "max_value": "8", - "text_size": "16px", - "text_color": "#000000", - "selected_text_color": "#ffffff", - "v_required": { - "value": false - }, - "relevance": { - "step4:no_of_fetuses_unknown": { - "ex-checkbox": [ - { - "not": [ - "no_of_fetuses_unknown" - ] - } - ] - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp", - "relevance": { - "step4:no_of_fetuses_unknown": { - "ex-checkbox": [ - { - "not": [ - "no_of_fetuses_unknown" - ] - } - ] - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10sp" - }, - { - "key": "no_of_fetuses_unknown", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165294AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "options": [ - { - "key": "no_of_fetuses_unknown", - "text": "{{anc_physical_exam.step4.no_of_fetuses_unknown.options.no_of_fetuses_unknown.text}}", - "value": "false", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165294AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "preeclampsia_risk", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-calculations-rules.yml" - } - } - } - }, - { - "key": "toaster30", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_physical_exam.step4.toaster30.text}}", - "text_color": "#D56900", - "toaster_info_text": "{{anc_physical_exam.step4.toaster30.toaster_info_text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - }, - { - "key": "fetal_presentation", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_physical_exam.step4.fetal_presentation.label}}", - "label_text_style": "bold", - "label_info_text": "{{anc_physical_exam.step4.fetal_presentation.label_info_text}}", - "options": [ - { - "key": "unknown", - "text": "{{anc_physical_exam.step4.fetal_presentation.options.unknown.text}}", - "value": "false", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "cephalic", - "text": "{{anc_physical_exam.step4.fetal_presentation.options.cephalic.text}}", - "value": "false", - "openmrs_entity": "concept", - "openmrs_entity_id": "160091AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "pelvic", - "text": "{{anc_physical_exam.step4.fetal_presentation.options.pelvic.text}}", - "value": "false", - "openmrs_entity": "concept", - "openmrs_entity_id": "146922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "transverse", - "text": "{{anc_physical_exam.step4.fetal_presentation.options.transverse.text}}", - "value": "false", - "openmrs_entity": "concept", - "openmrs_entity_id": "112259AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "other", - "text": "{{anc_physical_exam.step4.fetal_presentation.options.other.text}}", - "value": "false", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_physical_exam.step4.fetal_presentation.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "physical-exam-relevance-rules.yml" - } - } - } - } - ] - }, - "properties_file_name": "anc_physical_exam" + "validate_on_submit": true, + "display_scroll_bars": true, + "count": "5", + "encounter_type": "anc_physical_exam", + "entity_id": "", + "relational_id": "", + "form_version": "0.0.1", + "default_values": [ + "height", + "pregest_weight", + "pregest_weight_unknown", + "first_weight", + "no_of_fetuses_unknown", + "no_of_fetuses", + "ipv_physical_signs_symptoms" + ], + "global_previous": [ + "current_weight" + ], + "editable_fields": [ + "height", + "pregest_weight", + "pregest_weight_unknown", + "first_weight", + "no_of_fetuses_unknown", + "no_of_fetuses" + ], + "metadata": { + "start": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "start", + "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "end": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "end", + "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "today": { + "openmrs_entity_parent": "", + "openmrs_entity": "encounter", + "openmrs_entity_id": "encounter_date" + }, + "deviceid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "deviceid", + "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "subscriberid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "subscriberid", + "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "simserial": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "simserial", + "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "phonenumber": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "phonenumber", + "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "encounter_location": "", + "look_up": { + "entity_id": "", + "value": "" + } + }, + "step1": { + "title": "{{anc_physical_exam.step1.title}}", + "next": "step2", + "fields": [ + { + "key": "height_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step1.height_label.text}}", + "text_color": "#000000", + "v_required": { + "value": true + } + }, + { + "key": "height", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step1.height.v_required.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step1.height.v_numeric.err}}" + }, + "v_min": { + "value": "100", + "err": "{{anc_physical_exam.step1.height.v_min.err}}" + }, + "v_max": { + "value": "200", + "err": "{{anc_physical_exam.step1.height.v_max.err}}" + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "pregest_weight_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step1.pregest_weight_label.text}}", + "translation_text": "anc_physical_exam.step1.pregest_weight_label.text", + "text_color": "#000000", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step1.pregest_weight_label.v_required.err}}" + }, + "relevance": { + "step1:pregest_weight_unknown": { + "ex-checkbox": [ + { + "not": [ + "pregest_weight_unknown" + ] + } + ] + } + } + }, + { + "key": "pregest_weight", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165275AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "relevance": { + "step1:pregest_weight_unknown": { + "ex-checkbox": [ + { + "not": [ + "pregest_weight_unknown" + ] + } + ] + } + }, + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step1.pregest_weight.v_numeric.err}}" + }, + "v_min": { + "value": "30", + "err": "{{anc_physical_exam.step1.pregest_weight.v_min.err}}" + }, + "v_max": { + "value": "180", + "err": "{{anc_physical_exam.step1.pregest_weight.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step1.pregest_weight.v_required.err}}" + } + }, + { + "key": "pregest_weight_unknown", + "openmrs_entity_parent": "165277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "options": [ + { + "key": "pregest_weight_unknown", + "text": "{{anc_physical_exam.step1.pregest_weight_unknown.options.pregest_weight_unknown.text}}", + "translation_text": "anc_physical_exam.step1.pregest_weight_unknown.options.pregest_weight_unknown.text", + "value": "false", + "openmrs_entity_parent": "165277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "current_weight_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step1.current_weight_label.text}}", + "translation_text": "anc_physical_exam.step1.current_weight_label.text", + "text_color": "#000000", + "v_required": { + "value": true + } + }, + { + "key": "current_weight", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step1.current_weight.v_numeric.err}}" + }, + "v_min": { + "value": "30", + "err": "{{anc_physical_exam.step1.current_weight.v_min.err}}" + }, + "v_max": { + "value": "180", + "err": "{{anc_physical_exam.step1.current_weight.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step1.current_weight.v_required.err}}" + } + }, + { + "key": "first_weight", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "bmi", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "gdm_risk", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "weight_cat", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "exp_weight_gain", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "weight_gain_duration", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "weight_gain", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "tot_weight_gain", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster1", + "openmrs_entity_parent": "", + "openmrs_entity": "Body mass Index", + "openmrs_entity_id": "1432", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step1.toaster1.text}}", + "translation_text": "anc_physical_exam.step1.toaster1.text", + "text_color": "#1199F9", + "toaster_type": "info", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster2", + "openmrs_entity_parent": "", + "openmrs_entity": "Weight gain finding", + "openmrs_entity_id": "122887", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step1.toaster2.text}}", + "translation_text": "anc_physical_exam.step1.toaster2.text", + "text_color": "#1199F9", + "toaster_type": "info", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster3", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step1.toaster3.text}}", + "translation_text": "anc_physical_exam.step1.toaster3.text", + "text_color": "#D56900", + "toaster_info_text": "{{anc_physical_exam.step1.toaster3.toaster_info_text}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster4", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step1.toaster4.text}}", + "translation_text": "anc_physical_exam.step1.toaster4.text", + "text_color": "#1199F9", + "toaster_type": "info", + "toaster_info_text": "{{anc_physical_exam.step1.toaster4.toaster_info_text}}", + "toaster_info_title": "{{anc_physical_exam.step1.toaster4.toaster_info_title}}" + }, + { + "key": "toaster5", + "openmrs_entity_parent": "", + "openmrs_entity": "Weight gain finding", + "openmrs_entity_id": "122887", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step1.toaster5.text}}", + "translation_text": "anc_physical_exam.step1.toaster5.text", + "text_color": "#1199F9", + "toaster_type": "info", + "toaster_info_text": "{{anc_physical_exam.step1.toaster5.toaster_info_text}}", + "toaster_info_title": "{{anc_physical_exam.step1.toaster5.toaster_info_title}}", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster6", + "openmrs_entity_parent": "", + "openmrs_entity": "Weight gain finding", + "openmrs_entity_id": "122887", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step1.toaster6.text}}", + "translation_text": "anc_physical_exam.step1.toaster6.text", + "text_color": "#1199F9", + "toaster_type": "info", + "toaster_info_text": "{{anc_physical_exam.step1.toaster6.toaster_info_text}}", + "toaster_info_title": "{{anc_physical_exam.step1.toaster6.toaster_info_title}}", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + } + ] + }, + "step2": { + "title": "{{anc_physical_exam.step2.title}}", + "next": "step3", + "fields": [ + { + "key": "muac_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step2.muac_label.text}}", + "translation_text": "anc_physical_exam.step4.muac_label.text", + "text_color": "#000000", + "v_required": { + "value": true + } + }, + { + "key": "muac", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "muac", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step2.muac.v_required.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step2.muac.v_numeric.err}}" + }, + "v_min": { + "value": "1", + "err": "{{anc_physical_exam.step2.muac.v_min.err}}" + }, + "v_max": { + "value": "100", + "err": "{{anc_physical_exam.step2.muac.v_max.err}}" + } + }, + { + "key": "muac_toaster_malnourished", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "muac_toaster_malnourished", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step2.muac_toaster_malnourished.text}}", + "translation_text": "anc_physical_exam.step2.muac_toaster_malnourished.text", + "text_color": "#111111", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "muac_toaster_nourished", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "muac_toaster_nourished", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step2.muac_toaster_nourished.text}}", + "translation_text": "anc_physical_exam.step2.muac_toaster_nourished.text", + "text_color": "#111122", + "toaster_type": "positive", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "muac_toaster_abnormal", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "muac_toaster_abnormal", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step2.muac_toaster_abnormal.text}}", + "translation_text": "anc_physical_exam.step2.muac_toaster_abnormal.text", + "text_color": "#111111", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + } + ] + }, + "step3": { + "title": "{{anc_physical_exam.step3.title}}", + "next": "step4", + "fields": [ + { + "key": "bp_measurement_method", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_physical_exam.step3.bp_measurement_method.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "optibp", + "text": "{{anc_physical_exam.step3.bp_measurement_method.options.optibp.text}}", + "translation_text": "anc_physical_exam.step3.bp_measurement_method.options.optibp.text", + "value": false, + "openmrs_entity": "", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "manually", + "text": "{{anc_physical_exam.step3.bp_measurement_method.options.manually.text}}", + "translation_text": "anc_physical_exam.step3.bp_measurement_method.options.manually.text", + "value": false, + "openmrs_entity": "", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_measurement_method.v_required.err}}" + } + }, + + { + "key": "bp_systolic_optibp_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step3.bp_systolic_optibp_label.text}}", + "translation_text": "anc_physical_exam.step3.bp_systolic_optibp_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_systolic", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bp_systolic_optibp", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_systolic.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step3.bp_systolic.v_min.err}}" + }, + "v_max": { + "value": "260", + "err": "{{anc_physical_exam.step3.bp_systolic.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_systolic.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_diastolic_optibp_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step3.bp_diastolic_optibp_label.text}}", + "translation_text": "anc_physical_exam.step3.bp_diastolic_optibp_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_diastolic", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bp_diastolic_optibp", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_min.err}}" + }, + "v_max": { + "value": "260", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "cant_record_bp_optibp", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "options": [ + { + "key": "cant_record_bp_optibp", + "text": "{{anc_physical_exam.step3.cant_record_bp.options.cant_record_bp_optibp.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp.options.cant_record_bp_optibp.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "cant_record_bp_optibp" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "cant_record_bp_reason_opt", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165428AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "{{anc_physical_exam.step3.cant_record_bp_reason_opt.label}}", + "type": "check_box", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "optibp_didnt_load", + "text": "{{anc_physical_exam.step3.cant_record_bp_reason_opt.options.optibp_didnt_load.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp_reason_opt.options.optibp_didnt_load.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165386AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "optibp_returned_error", + "text": "{{anc_physical_exam.step3.cant_record_bp_reason_opt.options.optibp_returned_error.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp_reason_opt.options.optibp_returned_error.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165179AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_physical_exam.step3.cant_record_bp_reason.options.other.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp_reason.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.cant_record_bp_reason.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "record_bp_using_optibp_button", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "optibp", + "label": "{{anc_physical_exam.step3.record_bp_using_optibp_button.label}}", + "optibp_button_bg_color": "#EB5281", + "optibp_button_text_color": "#FFFFFF", + "read_only": false, + "optibp_data": { + "clientId": "", + "clientOpenSRPId": "", + "calibration": "" + }, + "fields_to_use_value": [ + "bp_systolic", + "bp_diastolic" + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_systolic_manual_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step3.bp_systolic_manual_label.text}}", + "translation_text": "anc_physical_exam.step3.bp_systolic_manual_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_systolic_manual", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bp_systolic", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_systolic.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step3.bp_systolic.v_min.err}}" + }, + "v_max": { + "value": "260", + "err": "{{anc_physical_exam.step3.bp_systolic.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_systolic.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_diastolic_manual_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step3.bp_diastolic_manual_label.text}}", + "translation_text": "anc_physical_exam.step3.bp_diastolic_manual_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_diastolic_manual", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bp_diastolic_manual", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_min.err}}" + }, + "v_max": { + "value": "260", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_diastolic.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "cant_record_bp_manual", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "options": [ + { + "key": "cant_record_bp_manual", + "text": "{{anc_physical_exam.step3.cant_record_bp.options.cant_record_bp_manual.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp.options.cant_record_bp_manual.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "cant_record_bp_manual" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "cant_record_bp_reason", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "cant_record_bp_reason", + "label": "{{anc_physical_exam.step3.cant_record_bp_reason.label}}", + "type": "check_box", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "bp_cuff_unavailable", + "text": "{{anc_physical_exam.step3.cant_record_bp_reason.options.bp_cuff_unavailable.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp_reason.options.bp_cuff_unavailable.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bp_cuff_unavailable" + }, + { + "key": "bp_cuff_broken", + "text": "{{anc_physical_exam.step3.cant_record_bp_reason.options.bp_cuff_broken.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp_reason.options.bp_cuff_broken.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bp_cuff_broken" + }, + { + "key": "other", + "text": "{{anc_physical_exam.step3.cant_record_bp_reason.options.other.text}}", + "translation_text": "anc_physical_exam.step3.cant_record_bp_reason.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bp_reason_other" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.cant_record_bp_reason.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + + { + "key": "bp_warning_manual", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.bp_warning_manual.text}}", + "translation_text": "anc_physical_exam.step3.bp_warning_manual.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_warning_optibp", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.bp_warning_optibp.text}}", + "translation_text": "anc_physical_exam.step3.bp_warning_optibp.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "bp_systolic_repeat_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step3.bp_systolic_repeat_label.text}}", + "translation_text": "anc_physical_exam.step3.bp_systolic_repeat_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_systolic_repeat", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165278AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_systolic_repeat.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step3.bp_systolic_repeat.v_min.err}}" + }, + "v_max": { + "value": "260", + "err": "{{anc_physical_exam.step3.bp_systolic_repeat.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_systolic_repeat.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "bp_diastolic_repeat_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step3.bp_diastolic_repeat_label.text}}", + "translation_text": "anc_physical_exam.step3.bp_diastolic_repeat_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "bp_diastolic_repeat", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165279AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step3.bp_diastolic_repeat.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step3.bp_diastolic_repeat.v_min.err}}" + }, + "v_max": { + "value": "260", + "err": "{{anc_physical_exam.step3.bp_diastolic_repeat.v_max.err}}" + }, + "v_required": { + "value": "false", + "err": "{{anc_physical_exam.step3.bp_diastolic_repeat.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "record_bp_using_optibp_2nd_reading_button", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "optibp", + "label": "{{anc_physical_exam.step3.record_bp_using_optibp_2nd_reading_button.label}}", + "optibp_button_bg_color": "#EB5281", + "optibp_button_text_color": "#FFFFFF", + "read_only": false, + "optibp_data": { + "clientId": "", + "clientOpenSRPId": "", + "calibration": "" + }, + "fields_to_use_value": [ + "bp_systolic_repeat", + "bp_diastolic_repeat" + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster8", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.toaster8.text}}", + "translation_text": "anc_physical_exam.step3.toaster8.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "symp_sev_preeclampsia", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165280AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "label": "{{anc_physical_exam.step3.symp_sev_preeclampsia.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_physical_exam.step3.symp_sev_preeclampsia.options.none.text}}", + "translation_text": "anc_physical_exam.step3.symp_sev_preeclampsia.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "severe_headache", + "text": "{{anc_physical_exam.step3.symp_sev_preeclampsia.options.severe_headache.text}}", + "translation_text": "anc_physical_exam.step3.symp_sev_preeclampsia.options.severe_headache.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "139081AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "visual_disturbance", + "text": "{{anc_physical_exam.step3.symp_sev_preeclampsia.options.visual_disturbance.text}}", + "translation_text": "anc_physical_exam.step3.symp_sev_preeclampsia.options.visual_disturbance.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "147104AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "epigastric_pain", + "text": "{{anc_physical_exam.step3.symp_sev_preeclampsia.options.epigastric_pain.text}}", + "translation_text": "anc_physical_exam.step3.symp_sev_preeclampsia.options.epigastric_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "141128AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "dizziness", + "text": "{{anc_physical_exam.step3.symp_sev_preeclampsia.options.dizziness.text}}", + "translation_text": "anc_physical_exam.step3.symp_sev_preeclampsia.options.dizziness.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "156046AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "vomiting", + "text": "{{anc_physical_exam.step3.symp_sev_preeclampsia.options.vomiting.text}}", + "translation_text": "anc_physical_exam.step3.symp_sev_preeclampsia.options.vomiting.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "122983AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.symp_sev_preeclampsia.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "urine_protein", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step3.urine_protein.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "none", + "text": "{{anc_physical_exam.step3.urine_protein.options.none.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "+", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_one.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_one.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "++", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_two.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_two.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "+++", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_three.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_three.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "++++", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_four.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_four.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step3.urine_protein.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "hypertension", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "47AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "severe_hypertension", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165205AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster9", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.toaster9.text}}", + "translation_text": "anc_physical_exam.step3.toaster9.text", + "toaster_info_text": "{{anc_physical_exam.step3.toaster9.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster10", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.toaster10.text}}", + "translation_text": "anc_physical_exam.step3.toaster10.text", + "toaster_info_text": "{{anc_physical_exam.step3.toaster10.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster11", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.toaster11.text}}", + "translation_text": "anc_physical_exam.step3.toaster11.text", + "toaster_info_text": "{{anc_physical_exam.step3.toaster11.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "severe_preeclampsia", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "113006AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster13", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.toaster13.text}}", + "translation_text": "anc_physical_exam.step3.toaster13.text", + "toaster_info_text": "{{anc_physical_exam.step3.toaster13.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "preeclampsia", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "129251AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster14", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step3.toaster14.text}}", + "translation_text": "anc_physical_exam.step3.toaster14.text", + "toaster_info_text": "{{anc_physical_exam.step3.toaster14.toaster_info_text}}", + "toaster_info_title": "{{anc_physical_exam.step3.toaster14.toaster_info_title}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + } + ] + }, + "step4": { + "title": "{{anc_physical_exam.step4.title}}", + "next": "step5", + "fields": [ + { + "key": "body_temp_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step4.body_temp_label.text}}", + "translation_text": "anc_physical_exam.step4.body_temp_label.text", + "text_color": "#000000", + "v_required": { + "value": true + } + }, + { + "key": "body_temp", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step4.body_temp.v_required.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step4.body_temp.v_numeric.err}}" + }, + "v_min": { + "value": "35", + "err": "{{anc_physical_exam.step4.body_temp.v_min.err}}" + }, + "v_max": { + "value": "42", + "err": "{{anc_physical_exam.step4.body_temp.v_max.err}}" + } + }, + { + "key": "toaster15", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster15.text}}", + "translation_text": "anc_physical_exam.step4.toaster15.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step4:body_temp": { + "type": "numeric", + "ex": "greaterThanEqualTo(., \"38\")" + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "body_temp_repeat_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step4.body_temp_repeat_label.text}}", + "translation_text": "anc_physical_exam.step4.body_temp_repeat_label.text", + "text_color": "#000000", + "label_info_text": "{{anc_physical_exam.step4.body_temp_repeat_label.label_info_text}}", + "v_required": { + "value": true + }, + "relevance": { + "step4:body_temp": { + "type": "numeric", + "ex": "greaterThanEqualTo(., \"38\")" + } + } + }, + { + "key": "body_temp_repeat", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step4.body_temp_repeat.v_required.err}}" + }, + "relevance": { + "step4:body_temp": { + "type": "numeric", + "ex": "greaterThanEqualTo(., \"38\")" + } + }, + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step4.body_temp_repeat.v_numeric.err}}" + }, + "v_min": { + "value": "35", + "err": "{{anc_physical_exam.step4.body_temp_repeat.v_min.err}}" + }, + "v_max": { + "value": "42", + "err": "{{anc_physical_exam.step4.body_temp_repeat.v_max.err}}" + } + }, + { + "key": "toaster16", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster16.text}}", + "translation_text": "anc_physical_exam.step4.toaster16.text", + "toaster_info_text": "{{anc_physical_exam.step4.toaster16.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "step4:body_temp_repeat": { + "type": "numeric", + "ex": "greaterThanEqualTo(., \"38\")" + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "pulse_rate_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step4.pulse_rate_label.text}}", + "translation_text": "anc_physical_exam.step4.pulse_rate_label.text", + "text_color": "#000000", + "v_required": { + "value": true + } + }, + { + "key": "pulse_rate", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step4.pulse_rate.v_required.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step4.pulse_rate.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step4.pulse_rate.v_min.err}}" + }, + "v_max": { + "value": "200", + "err": "{{anc_physical_exam.step4.pulse_rate.v_max.err}}" + } + }, + { + "key": "toaster17", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster17.text}}", + "translation_text": "anc_physical_exam.step4.toaster17.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "pulse_rate_repeat_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step4.pulse_rate_repeat_label.text}}", + "translation_text": "anc_physical_exam.step4.pulse_rate_repeat_label.text", + "label_info_text": "{{anc_physical_exam.step4.pulse_rate_repeat_label.label_info_text}}", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "pulse_rate_repeat", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_numeric": { + "value": "true", + "err": "{{anc_physical_exam.step4.pulse_rate_repeat.v_numeric.err}}" + }, + "v_min": { + "value": "20", + "err": "{{anc_physical_exam.step4.pulse_rate_repeat.v_min.err}}" + }, + "v_max": { + "value": "200", + "err": "{{anc_physical_exam.step4.pulse_rate_repeat.v_max.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step4.pulse_rate_repeat.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster18", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster18.text}}", + "translation_text": "anc_physical_exam.step4.toaster18.text", + "toaster_info_text": "{{anc_physical_exam.step4.toaster18.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "pallor", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5245AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.pallor.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_physical_exam.step4.pallor.options.yes.text}}", + "translation_text": "anc_physical_exam.step4.pallor.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_physical_exam.step4.pallor.options.no.text}}", + "translation_text": "anc_physical_exam.step4.pallor.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "anaemic", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "121629AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster19", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster19.text}}", + "translation_text": "anc_physical_exam.step4.toaster19.text", + "toaster_info_text": "{{anc_physical_exam.step4.toaster19.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "respiratory_exam", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.respiratory_exam.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "extra_rel": true, + "has_extra_rel": "3", + "options": [ + { + "key": "1", + "text": "{{anc_physical_exam.step4.respiratory_exam.options.1.text}}", + "translation_text": "anc_physical_exam.step4.respiratory_exam.options.1.text", + "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "2", + "text": "{{anc_physical_exam.step4.respiratory_exam.options.2.text}}", + "translation_text": "anc_physical_exam.step4.respiratory_exam.options.2.text", + "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "3", + "text": "{{anc_physical_exam.step4.respiratory_exam.options.3.text}}", + "translation_text": "anc_physical_exam.step4.respiratory_exam.options.3.text", + "specify_info": "tentukan...", + "specify_widget": "check_box", + "specify_info_color": "#8C8C8C", + "content_form": "respiratory_exam_sub_form", + "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "respiratory_rate_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step4.respiratory_rate_label.text}}", + "translation_text": "anc_physical_exam.step4.respiratory_rate_label.text", + "text_color": "#000000", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step4.respiratory_rate_label.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "respiratory_rate", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_min": { + "value": "0", + "err": "{{anc_physical_exam.step4.respiratory_rate_label.v_min.err}}" + }, + "v_max": { + "value": "200", + "err": "{{anc_physical_exam.step4.respiratory_rate_label.v_max.err}}" + }, + "v_numeric_integer": { + "value": "true", + "err": "{{anc_physical_exam.step4.respiratory_rate_label.v_numeric_integer.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step4.respiratory_rate.v_required.err}}" + } + }, + + { + "key": "toaster20", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster20.text}}", + "translation_text": "anc_physical_exam.step4.toaster20.text", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "step4:respiratory_exam": { + "type": "string", + "ex": "equalTo(., \"3\")" + } + } + }, + { + "key": "oximetry_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step4.oximetry_label.text}}", + "translation_text": "anc_physical_exam.step4.oximetry_label.text", + "text_color": "#000000", + "relevance": { + "step4:respiratory_exam": { + "type": "string", + "ex": "equalTo(., \"3\")" + } + } + }, + { + "key": "oximetry", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "relevance": { + "step4:respiratory_exam": { + "type": "string", + "ex": "equalTo(., \"3\")" + } + } + }, + { + "key": "toaster21", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster21.text}}", + "translation_text": "anc_physical_exam.step4.toaster21.text", + "toaster_info_text": "{{anc_physical_exam.step4.toaster21.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "cardiac_exam", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.cardiac_exam.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "extra_rel": true, + "has_extra_rel": "3", + "options": [ + { + "key": "1", + "text": "{{anc_physical_exam.step4.cardiac_exam.options.1.text}}", + "translation_text": "anc_physical_exam.step4.cardiac_exam.options.1.text", + "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "2", + "text": "{{anc_physical_exam.step4.cardiac_exam.options.2.text}}", + "translation_text": "anc_physical_exam.step4.cardiac_exam.options.2.text", + "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "3", + "text": "{{anc_physical_exam.step4.cardiac_exam.options.3.text}}", + "translation_text": "anc_physical_exam.step4.cardiac_exam.options.3.text", + "specify_info": "tentukan...", + "specify_widget": "check_box", + "specify_info_color": "#8C8C8C", + "content_form": "cardiac_exam_sub_form", + "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "toaster22", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster22.text}}", + "translation_text": "anc_physical_exam.step4.toaster22.text", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "breast_exam", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.breast_exam.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "extra_rel": true, + "has_extra_rel": "3", + "options": [ + { + "key": "1", + "text": "{{anc_physical_exam.step4.breast_exam.options.1.text}}", + "translation_text": "anc_physical_exam.step4.breast_exam.options.1.text", + "openmrs_entity_parent": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "2", + "text": "{{anc_physical_exam.step4.breast_exam.options.2.text}}", + "translation_text": "anc_physical_exam.step4.breast_exam.options.2.text", + "openmrs_entity_parent": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "3", + "text": "{{anc_physical_exam.step4.breast_exam.options.3.text}}", + "translation_text": "anc_physical_exam.step4.breast_exam.options.3.text", + "specify_info": "tentukan...", + "specify_widget": "check_box", + "specify_info_color": "#8C8C8C", + "content_form": "breast_exam_sub_form", + "openmrs_entity_parent": "165369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "toaster23", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster23.text}}", + "translation_text": "anc_physical_exam.step4.toaster23.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "abdominal_exam", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.abdominal_exam.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "extra_rel": true, + "has_extra_rel": "3", + "options": [ + { + "key": "1", + "text": "{{anc_physical_exam.step4.abdominal_exam.options.1.text}}", + "translation_text": "anc_physical_exam.step4.abdominal_exam.options.1.text", + "openmrs_entity_parent": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "2", + "text": "{{anc_physical_exam.step4.abdominal_exam.options.2.text}}", + "translation_text": "anc_physical_exam.step4.abdominal_exam.options.2.text", + "openmrs_entity_parent": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "3", + "text": "{{anc_physical_exam.step4.abdominal_exam.options.3.text}}", + "translation_text": "anc_physical_exam.step4.abdominal_exam.options.3.text", + "specify_info": "tentukan...", + "specify_widget": "check_box", + "specify_info_color": "#8C8C8C", + "content_form": "abdominal_exam_sub_form", + "openmrs_entity_parent": "165370AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "toaster24", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster24.text}}", + "translation_text": "anc_physical_exam.step4.toaster24.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "pelvic_exam", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.pelvic_exam.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "extra_rel": true, + "has_extra_rel": "3", + "options": [ + { + "key": "1", + "text": "{{anc_physical_exam.step4.pelvic_exam.options.1.text}}", + "translation_text": "anc_physical_exam.step4.pelvic_exam.options.1.text", + "openmrs_entity_parent": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "2", + "text": "{{anc_physical_exam.step4.pelvic_exam.options.2.text}}", + "translation_text": "anc_physical_exam.step4.pelvic_exam.options.2.text", + "openmrs_entity_parent": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "3", + "text": "{{anc_physical_exam.step4.pelvic_exam.options.3.text}}", + "translation_text": "anc_physical_exam.step4.pelvic_exam.options.3.text", + "specify_info": "tentukan...", + "specify_widget": "check_box", + "specify_info_color": "#8C8C8C", + "content_form": "pelvic_exam_sub_form", + "openmrs_entity_parent": "165373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "toaster25", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster25.text}}", + "translation_text": "anc_physical_exam.step4.toaster25.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "cervical_exam", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.cervical_exam.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "extra_rel": true, + "has_extra_rel": "1", + "options": [ + { + "key": "1", + "text": "{{anc_physical_exam.step4.cervical_exam.options.1.text}}", + "translation_text": "anc_physical_exam.step4.cervical_exam.options.1.text", + "openmrs_entity_parent": "165374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "", + "openmrs_entity_id": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "specify_info": "tentukkan nilai dalam cm pembukaan serviks...", + "specify_widget": "normal_edit_text", + "specify_info_color": "#8C8C8C", + "secondary_suffix": "cm", + "content_form": "cervical_exam_sub_form" + }, + { + "key": "2", + "text": "{{anc_physical_exam.step4.cervical_exam.options.2.text}}", + "translation_text": "anc_physical_exam.step4.cervical_exam.options.2.text", + "openmrs_entity_parent": "165374AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "toaster26_hidden", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + }, + "src": { + "key": "cervical_exam", + "option_key": "1", + "stepName": "step4" + } + } + }, + { + "key": "toaster26", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster26.text}}", + "translation_text": "anc_physical_exam.step4.toaster26.text", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "oedema", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.oedema.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "extra_rel": true, + "has_extra_rel": "yes", + "options": [ + { + "key": "yes", + "text": "{{anc_physical_exam.step4.oedema.options.yes.text}}", + "translation_text": "anc_physical_exam.step4.oedema.options.yes.text", + "specify_info": "tentukkan tipe...", + "specify_widget": "radio_button", + "specify_info_color": "#8C8C8C", + "content_form": "oedema_present_sub_form", + "openmrs_entity_parent": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_physical_exam.step4.oedema.options.no.text}}", + "translation_text": "anc_physical_exam.step4.oedema.options.no.text", + "openmrs_entity_parent": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "oedema_severity", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.oedema_severity.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "+", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_one.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_one.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "++", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_two.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_two.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "+++", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_three.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_three.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "++++", + "text": "{{anc_physical_exam.step3.urine_protein.options.plus_four.text}}", + "translation_text": "anc_physical_exam.step3.urine_protein.options.plus_four.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "164494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": "false", + "err": "{{anc_physical_exam.step4.oedema_severity.v_required.err}}" + }, + "relevance": { + "step4:oedema": { + "type": "string", + "ex": "equalTo(., \"yes\")" + } + } + }, + { + "key": "ipv_physical_signs_symptoms", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms.label}}", + "label_info_text": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms.label_info_text}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms.options.none.text}}", + "translation_text": "anc_physical_exam.step4.ipv_physical_signs_symptoms.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "abdomen_injury", + "text": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms.options.abdomen_injury.text}}", + "translation_text": "anc_physical_exam.step4.ipv_physical_signs_symptoms.options.abdomen_injury.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "other_injury", + "text": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms.options.other_injury.text}}", + "translation_text": "anc_physical_exam.step4.ipv_physical_signs_symptoms.options.other_injury.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "other", + "text": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms.options.other.text}}", + "translation_text": "anc_physical_exam.step4.ipv_physical_signs_symptoms.options.other.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "ipv_physical_signs_symptoms_injury_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms_injury_other.hint}}", + "edit_type": "name", + "relevance": { + "step4:ipv_physical_signs_symptoms": { + "ex-checkbox": [ + { + "or": [ + "other_injury" + ] + } + ] + } + } + }, + { + "key": "ipv_physical_signs_symptoms_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_physical_exam.step4.ipv_physical_signs_symptoms_other.hint}}", + "edit_type": "name", + "relevance": { + "step4:ipv_physical_signs_symptoms": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "ipv_suspect", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster31", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step4.toaster31.text}}", + "translation_text": "anc_physical_exam.step4.toaster31.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "ipv_clinical_enquiry", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.ipv_clinical_enquiry.label}}", + "label_info_text": "{{anc_physical_exam.step4.ipv_clinical_enquiry.label_info_text}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_physical_exam.step4.ipv_clinical_enquiry.options.yes.text}}", + "translation_text": "anc_physical_exam.step4.ipv_clinical_enquiry.options.yes.text", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "no", + "text": "{{anc_physical_exam.step4.ipv_clinical_enquiry.options.no.text}}", + "translation_text": "anc_physical_exam.step4.ipv_clinical_enquiry.options.no.text", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "ipv_clinical_enquiry_not_done_reason", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "referred", + "text": "{{anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.referred.text}}", + "translation_text": "anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.referred.text", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "provider_unavailable", + "text": "{{anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.provider_unavailable.text}}", + "translation_text": "anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.provider_unavailable.text", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "space_unavailable", + "text": "{{anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.space_unavailable.text}}", + "translation_text": "anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.space_unavailable.text", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "confidentiality", + "text": "{{anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.confidentiality.text}}", + "translation_text": "anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.confidentiality.text", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "other", + "text": "{{anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.other.text}}", + "translation_text": "anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason.options.other.text", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "ipv_clinical_enquiry_not_done_reason_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_physical_exam.step4.ipv_clinical_enquiry_not_done_reason_other.hint}}", + "edit_type": "name", + "relevance": { + "step4:ipv_clinical_enquiry_not_done_reason": { + "type": "string", + "ex": "equalTo(., \"other\")" + } + } + }, + { + "key": "ipv_subject", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_physical_exam.step4.ipv_subject.label}}", + "label_info_text": "{{anc_physical_exam.step4.ipv_subject.label_info_text}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_physical_exam.step4.ipv_subject.options.yes.text}}", + "translation_text": "anc_physical_exam.step4.ipv_subject.options.yes.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "no", + "text": "{{anc_physical_exam.step4.ipv_subject.options.no.text}}", + "translation_text": "anc_physical_exam.step4.ipv_subject.options.no.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step4.ipv_subject.v_required.err}}" + } + }, + { + "key": "ipv_subject_violence_types", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_physical_exam.step4.ipv_subject_violence_types.label}}", + "label_info_text": "{{anc_physical_exam.step4.ipv_subject_violence_types.label_info_text}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "phys_violence", + "text": "{{anc_physical_exam.step4.ipv_subject_violence_types.options.phys_violence.text}}", + "translation_text": "anc_physical_exam.step4.ipv_subject_violence_types.options.phys_violence.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "sexual_violence", + "text": "{{anc_physical_exam.step4.ipv_subject_violence_types.options.sexual_violence.text}}", + "translation_text": "anc_physical_exam.step4.ipv_subject_violence_types.options.sexual_violence.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "emotional_abuse", + "text": "{{anc_physical_exam.step4.ipv_subject_violence_types.options.emotional_abuse.text}}", + "translation_text": "anc_physical_exam.step4.ipv_subject_violence_types.options.emotional_abuse.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "family_member_violence", + "text": "{{anc_physical_exam.step4.ipv_subject_violence_types.options.family_member_violence.text}}", + "translation_text": "anc_physical_exam.step4.ipv_subject_violence_types.options.family_member_violence.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + } + ] + }, + "step5": { + "title": "{{anc_physical_exam.step5.title}}", + "fields": [ + { + "key": "sfh_measurement", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "sfh_measurement", + "type": "native_radio", + "label": "{{anc_physical_exam.step5.sfh_measurement.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "done", + "text": "{{anc_physical_exam.step5.sfh_measurement.options.done.text}}", + "translation_text": "anc_physical_exam.step5.sfh_measurement.options.done.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "sfh_measurement_done", + "openmrs_entity_parent": "sfh_measurement" + }, + { + "key": "not_done", + "text": "{{anc_physical_exam.step5.sfh_measurement.options.not_done.text}}", + "translation_text": "anc_physical_exam.step5.sfh_measurement.options.not_done.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "sfh_measurement_not_done", + "openmrs_entity_parent": "sfh_measurement" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step5.sfh_measurement.v_required.err}}" + } + }, + { + "key": "sfh_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step5.sfh_label.text}}", + "translation_text": "anc_physical_exam.step5.sfh_label.text", + "text_color": "#000000", + "v_required": { + "value": false + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "sfh", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_min": { + "value": "0.1", + "err": "{{anc_physical_exam.step5.sfh.v_min.err}}" + }, + "v_max": { + "value": "44", + "err": "{{anc_physical_exam.step5.sfh.v_max.err}}" + }, + "v_numeric_integer": { + "value": "true", + "err": "{{anc_physical_exam.step5.sfh.v_numeric_integer.err}}" + }, + "v_required": { + "value": "false", + "err": "{{anc_physical_exam.step5.sfh.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "fetal_movement", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165376AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step5.fetal_movement.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_physical_exam.step5.fetal_movement.options.yes.text}}", + "translation_text": "anc_physical_exam.step5.fetal_movement.options.yes.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "165376AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_physical_exam.step5.fetal_movement.options.no.text}}", + "translation_text": "anc_physical_exam.step5.fetal_movement.options.no.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "165376AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": "false", + "err": "{{anc_physical_exam.step5.fetal_movement.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "fetal_heartbeat", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step5.fetal_heartbeat.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_physical_exam.step5.fetal_heartbeat.options.yes.text}}", + "translation_text": "anc_physical_exam.step5.fetal_heartbeat.options.yes.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "165377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_physical_exam.step5.fetal_heartbeat.options.no.text}}", + "translation_text": "anc_physical_exam.step5.fetal_heartbeat.options.no.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "165377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step5.fetal_heartbeat.v_required.err}}" + } + }, + { + "key": "fetal_heart_rate_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step5.fetal_heart_rate_label.text}}", + "translation_text": "anc_physical_exam.step5.fetal_heart_rate_label.text", + "text_color": "#000000", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step5.fetal_heart_rate_label.v_required.err}}" + }, + "relevance": { + "step5:fetal_heartbeat": { + "type": "string", + "ex": "equalTo(., \"yes\")" + } + } + }, + { + "key": "fetal_heart_rate", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_min": { + "value": "80", + "err": "{{anc_physical_exam.step5.fetal_heart_rate.v_min.err}}" + }, + "v_max": { + "value": "200", + "err": "{{anc_physical_exam.step5.fetal_heart_rate.v_max.err}}" + }, + "v_numeric_integer": { + "value": "true", + "err": "{{anc_physical_exam.step5.fetal_heart_rate.v_numeric_integer.err}}" + }, + "relevance": { + "step5:fetal_heartbeat": { + "type": "string", + "ex": "equalTo(., \"yes\")" + } + }, + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step5.fetal_heart_rate.v_required.err}}" + } + }, + { + "key": "toaster27", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step5.toaster27.text}}", + "translation_text": "anc_physical_exam.step5.toaster27.text", + "toaster_info_text": "{{anc_physical_exam.step5.toaster27.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster28", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step5.toaster28.text}}", + "translation_text": "anc_physical_exam.step5.toaster28.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "fetal_heart_rate_repeat_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step5.fetal_heart_rate_repeat_label.text}}", + "translation_text": "anc_physical_exam.step5.fetal_heart_rate_repeat_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "fetal_heart_rate_repeat", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "edit_type": "number", + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step5.fetal_heart_rate_repeat.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "toaster29", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step5.toaster29.text}}", + "translation_text": "anc_physical_exam.step5.toaster29.text", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "no_of_fetuses_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_physical_exam.step5.no_of_fetuses_label.text}}", + "translation_text": "anc_physical_exam.step5.no_of_fetuses_label.text", + "text_color": "#000000", + "v_required": { + "value": false + }, + "relevance": { + "step5:no_of_fetuses_unknown": { + "ex-checkbox": [ + { + "not": [ + "no_of_fetuses_unknown" + ] + } + ] + } + } + }, + { + "key": "no_of_fetuses", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165293AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "numbers_selector", + "number_of_selectors": "5", + "start_number": "1", + "max_value": "8", + "text_size": "16px", + "text_color": "#000000", + "selected_text_color": "#ffffff", + "v_required": { + "value": false + }, + "relevance": { + "step5:no_of_fetuses_unknown": { + "ex-checkbox": [ + { + "not": [ + "no_of_fetuses_unknown" + ] + } + ] + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp", + "relevance": { + "step5:no_of_fetuses_unknown": { + "ex-checkbox": [ + { + "not": [ + "no_of_fetuses_unknown" + ] + } + ] + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10sp" + }, + { + "key": "no_of_fetuses_unknown", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165294AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "options": [ + { + "key": "no_of_fetuses_unknown", + "text": "{{anc_physical_exam.step5.no_of_fetuses_unknown.options.no_of_fetuses_unknown.text}}", + "translation_text": "anc_physical_exam.step5.no_of_fetuses_unknown.options.no_of_fetuses_unknown.text", + "value": "false", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165294AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ] + }, + { + "key": "preeclampsia_risk", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-calculations-rules.yml" + } + } + } + }, + { + "key": "toaster30", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_physical_exam.step5.toaster30.text}}", + "translation_text": "anc_physical_exam.step5.toaster30.text", + "text_color": "#D56900", + "toaster_info_text": "{{anc_physical_exam.step5.toaster30.toaster_info_text}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + }, + { + "key": "fetal_presentation", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_physical_exam.step5.fetal_presentation.label}}", + "label_text_style": "bold", + "label_info_text": "{{anc_physical_exam.step5.fetal_presentation.label_info_text}}", + "options": [ + { + "key": "unknown", + "text": "{{anc_physical_exam.step5.fetal_presentation.options.unknown.text}}", + "translation_text": "anc_physical_exam.step5.fetal_presentation.options.unknown.text", + "value": "false", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "cephalic", + "text": "{{anc_physical_exam.step5.fetal_presentation.options.cephalic.text}}", + "translation_text": "anc_physical_exam.step5.fetal_presentation.options.cephalic.text", + "value": "false", + "openmrs_entity": "concept", + "openmrs_entity_id": "160091AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "pelvic", + "text": "{{anc_physical_exam.step5.fetal_presentation.options.pelvic.text}}", + "translation_text": "anc_physical_exam.step5.fetal_presentation.options.pelvic.text", + "value": "false", + "openmrs_entity": "concept", + "openmrs_entity_id": "146922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "transverse", + "text": "{{anc_physical_exam.step5.fetal_presentation.options.transverse.text}}", + "translation_text": "anc_physical_exam.step5.fetal_presentation.options.transverse.text", + "value": "false", + "openmrs_entity": "concept", + "openmrs_entity_id": "112259AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "other", + "text": "{{anc_physical_exam.step5.fetal_presentation.options.other.text}}", + "translation_text": "anc_physical_exam.step5.fetal_presentation.options.other.text", + "value": "false", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_physical_exam.step5.fetal_presentation.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "physical-exam-relevance-rules.yml" + } + } + } + } + ] + }, + "properties_file_name": "anc_physical_exam" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/anc_profile.json b/opensrp-anc/src/main/assets/json.form/anc_profile.json index 430a714f0..1bb4eb10a 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_profile.json +++ b/opensrp-anc/src/main/assets/json.form/anc_profile.json @@ -1,3462 +1,3598 @@ { - "validate_on_submit": true, - "display_scroll_bars": true, - "count": "8", - "encounter_type": "Profile", - "entity_id": "", - "relational_id": "", - "form_version": "0.0.15", - "metadata": { - "start": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "start", - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "end": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "end", - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "today": { - "openmrs_entity_parent": "", - "openmrs_entity": "encounter", - "openmrs_entity_id": "encounter_date" - }, - "deviceid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "deviceid", - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "subscriberid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "subscriberid", - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "simserial": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "simserial", - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "phonenumber": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "phonenumber", - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "encounter_location": "44de66fb-e6c6-4bae-92bb-386dfe626eba", - "look_up": { - "entity_id": "", - "value": "" - } - }, - "editable_fields": [ - "educ_level", - "marital_status", - "occupation", - "occupation_other", - "lmp_known", - "lmp_known_date", - "ultrasound_done", - "ultrasound_done_date", - "ultrasound_gest_age_wks", - "sfh_gest_age", - "select_gest_age_edd", - "gravida", - "previous_pregnancies", - "miscarriages_abortions", - "live_births", - "stillbirths", - "parity", - "c_sections", - "prev_preg_comps", - "allergies", - "allergies_other", - "surgeries", - "surgeries_other_gyn_proced", - "surgeries_other", - "health_conditions", - "health_conditions_other", - "hiv_diagnosis_date", - "tt_immun_status", - "flu_immun_status", - "medications", - "medications_other", - "caffeine_intake", - "tobacco_user", - "shs_exposure", - "condom_use", - "alcohol_substance_enquiry", - "alcohol_substance_use", - "other_substance_use", - "partner_hiv_status" - ], - "default_values": [ - "educ_level", - "marital_status", - "occupation", - "occupation_other", - "lmp_known", - "lmp_known_date", - "ultrasound_done", - "ultrasound_done_date", - "ultrasound_gest_age_wks", - "sfh_gest_age", - "select_gest_age_edd", - "gravida", - "previous_pregnancies", - "miscarriages_abortions", - "live_births", - "stillbirths", - "parity", - "c_sections", - "prev_preg_comps", - "allergies", - "allergies_other", - "surgeries", - "surgeries_other_gyn_proced", - "surgeries_other", - "health_conditions", - "health_conditions_other", - "hiv_diagnosis_date", - "tt_immun_status", - "flu_immun_status", - "medications", - "medications_other", - "caffeine_intake", - "tobacco_user", - "shs_exposure", - "condom_use", - "alcohol_substance_enquiry", - "alcohol_substance_use", - "other_substance_use", - "partner_hiv_status", - "lmp_gest_age_selection", - "ultrasound_gest_age_selection", - "sfh_gest_age_selection", - "lmp_ultrasound_gest_age_selection", - "sfh_ultrasound_gest_age_selection" - ], - "global_previous": [ - "age" - ], - "step1": { - "title": "{{anc_profile.step1.title}}", - "next": "step2", - "fields": [ - { - "key": "headss_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "toaster_notes", - "type": "toaster_notes", - "text": "{{anc_profile.step1.headss_toaster.text}}", - "text_color": "#1199F9", - "toaster_info_text": "{{anc_profile.step1.headss_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step1.headss_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "educ_level", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1712AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step1.educ_level.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "none", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "text": "{{anc_profile.step1.educ_level.options.none.text}}" - }, - { - "key": "dont_know", - "text": "{{anc_profile.step1.educ_level.options.dont_know.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "primary", - "text": "{{anc_profile.step1.educ_level.options.primary.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1713AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "secondary", - "text": "{{anc_profile.step1.educ_level.options.secondary.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1714AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "higher", - "text": "{{anc_profile.step1.educ_level.options.higher.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160292AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step1.educ_level.v_required.err}}" - } - }, - { - "key": "marital_status", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1054AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step1.marital_status.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "married", - "text": "{{anc_profile.step1.marital_status.options.married.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1055AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "divorced", - "text": "{{anc_profile.step1.marital_status.options.divorced.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1058AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "single", - "text": "{{anc_profile.step1.marital_status.options.single.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5615AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "widowed", - "text": "{{anc_profile.step1.marital_status.options.widowed.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1059AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step1.marital_status.v_required.err}}" - } - }, - { - "key": "occupation", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1542AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select multiple", - "type": "check_box", - "label": "{{anc_profile.step1.occupation.label}}", - "hint": "{{anc_profile.step1.occupation.hint}}", - "label_text_style": "bold", - "options": [ - { - "key": "student", - "text": "{{anc_profile.step1.occupation.options.student.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159465AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "unemployed", - "text": "{{anc_profile.step1.occupation.options.unemployed.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "123801AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "formal_employment", - "text": "{{anc_profile.step1.occupation.options.formal_employment.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "informal_employment_sex_worker", - "text": "{{anc_profile.step1.occupation.options.informal_employment_sex_worker.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160579AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "informal_employment_other", - "text": "{{anc_profile.step1.occupation.options.informal_employment_other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159613AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_profile.step1.occupation.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step1.occupation.v_required.err}}" - } - }, - { - "key": "occupation_other", - "openmrs_entity_parent": "1542AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step1.occupation_other.hint}}", - "edit_type": "name", - "relevance": { - "step1:occupation": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - }, - "v_required": { - "value": false, - "err": "{{anc_profile.step1.occupation_other.v_required.err}}" - }, - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_profile.step1.occupation_other.v_regex.err}}" - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165257AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "hiv_risk", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "hiv_risk_counseling_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "Counselling (Human immunodeficiency virus [HIV] counselling)", - "openmrs_entity_id": "2047", - "type": "toaster_notes", - "text": "{{anc_profile.step1.hiv_risk_counseling_toaster.text}}", - "toaster_info_text": "{{anc_profile.step1.hiv_risk_counseling_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step1.hiv_risk_counseling_toaster.toaster_info_title}}", - "toaster_type": "problem", - "text_color": "#CF0800", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - } - ] - }, - "step2": { - "title": "{{anc_profile.step2.title}}", - "next": "step3", - "fields": [ - { - "key": "lmp_known", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165258AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step2.lmp_known.label}}", - "label_info_text": "{{anc_profile.step2.lmp_known.label_info_text}}", - "label_info_title": "{{anc_profile.step2.lmp_known.label_info_title}}", - "label_text_style": "bold", - "max_date": "today", - "options": [ - { - "key": "yes", - "text": "{{anc_profile.step2.lmp_known.options.yes.text}}", - "translation_text": "anc_profile.step2.lmp_known.options.yes.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "specify_info": "specify date", - "specify_widget": "date_picker", - "max_date": "today-14d", - "min_date": "today-280d", - "default": "today" - }, - { - "key": "no", - "text": "{{anc_profile.step2.lmp_known.options.no.text}}", - "translation_text": "anc_profile.step2.lmp_known.options.no.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step2.lmp_known.v_required.err}}" - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "lmp_known_date", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "lmp_edd", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "lmp_gest_age", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "ultrasound_done", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step2.ultrasound_done.label}}", - "label_info_text": "{{anc_profile.step2.ultrasound_done.label_info_text}}", - "label_info_title": "{{anc_profile.step2.ultrasound_done.label_info_title}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_profile.step2.ultrasound_done.options.yes.text}}", - "translation_text": "anc_profile.step2.ultrasound_done.options.yes.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "specify_info": "ultrasound date", - "specify_widget": "date_picker", - "max_date": "today", - "min_date": "today-9m", - "default": "today" - }, - { - "key": "no", - "text": "{{anc_profile.step2.ultrasound_done.options.no.text}}", - "translation_text": "anc_profile.step2.ultrasound_done.options.no.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step2.ultrasound_done.v_required.err}}" - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163165AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "ultrasound_done_date", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "ultrasound_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "toaster_notes", - "type": "toaster_notes", - "text": "{{anc_profile.step2.ultrasound_toaster.text}}", - "text_color": "#1199F9", - "toaster_info_text": "{{anc_profile.step2.ultrasound_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step2.ultrasound_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "facility_in_us_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "toaster_notes", - "type": "toaster_notes", - "text": "{{anc_profile.step2.facility_in_us_toaster.text}}", - "text_color": "#1199F9", - "toaster_info_text": "{{anc_profile.step2.facility_in_us_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step2.facility_in_us_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "ultrasound_gest_age_wks", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_profile.step2.ultrasound_gest_age_wks.hint}}", - "relevance": { - "step2:ultrasound_done": { - "type": "string", - "ex": "equalTo(., \"yes\")" - } - }, - "v_required": { - "value": true, - "err": "{{anc_profile.step2.ultrasound_gest_age_wks.v_required.err}}" - }, - "v_numeric_integer": { - "value": true, - "err": "Enter a Valid GA from ultrasound - weeks value" - }, - "v_min": { - "value": "4", - "err": "GA from ultrasound - weeks should be equal to or greater than 4" - }, - "v_max": { - "value": "40", - "err": "GA from ultrasound - weeks should be less than or equal to 40" - } - }, - { - "key": "ultrasound_gest_age_days", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_profile.step2.ultrasound_gest_age_days.hint}}", - "relevance": { - "step2:ultrasound_done": { - "type": "string", - "ex": "equalTo(., \"yes\")" - } - }, - "v_required": { - "value": false, - "err": "{{anc_profile.step2.ultrasound_gest_age_days.v_required.err}}" - }, - "v_numeric_integer": { - "value": true, - "err": "Enter a Valid GA from ultrasound - days value" - }, - "v_min": { - "value": "1", - "err": "GA from ultrasound - days should be equal to or greater than 1" - }, - "v_max": { - "value": "6", - "err": "GA from ultrasound - days should be less than or equal to 6" - } - }, - { - "key": "ultrasound_gest_age_concept", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "165220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "ultrasound_edd", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "ultrasound_ga_hidden", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "ultrasound_gest_age", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "sfh_gest_age", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "label_info_text": "If LMP is unknown and ultrasound wasn\u0027t done or it wasn\u0027t done early (before 24 weeks), then assess GA based on Symphysis Fundal Height (SFH) or abdominal palpation. Compare this GA against ultrasound GA (if done).", - "label_info_title": "GA from SFH or abdominal palpation - weeks", - "hint": "{{anc_profile.step2.sfh_gest_age.hint}}", - "v_required": { - "value": true, - "err": "{{anc_profile.step2.sfh_gest_age.v_required.err}}" - }, - "v_numeric_integer": { - "value": true, - "err": "Enter a Valid GA from SFH or abdominal palpation - weeks value" - }, - "v_min": { - "value": "4", - "err": "GA from SFH or abdominal palpation - weeks should 4 or greater" - }, - "v_max": { - "value": "40", - "err": "GA from SFH or abdominal palpation - weeks should be 40 or less" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "sfh_edd", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "sfh_ga_hidden", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "select_gest_age_edd_label", - "type": "label", - "text": "{{anc_profile.step2.select_gest_age_edd_label.text}}", - "label_info_text": "If the difference between GA from LMP and early ultrasound is one week or less, then use GA from LMP. If the difference is more than 7 days, use the early ultrasound GA. If ultrasound was done late, use GA from LMP. Between late ultrasound and SFH or abdominal palpation, use your best judgment to select GA.", - "label_text_style": "bold", - "text_color": "#000000", - "v_required": { - "value": true, - "err": "{{anc_profile.step2.select_gest_age_edd_label.v_required.err}}" - } - }, - { - "key": "lmp_gest_age_selection", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "options": [ - { - "key": "lmp", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "text": "{{anc_profile.step2.lmp_gest_age_selection.options.lmp.text}}", - "extra_info": "GA: {lmp_gest_age}\u003cbr/\u003eEDD: {lmp_edd}" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step2.lmp_gest_age_selection.v_required.err}}" - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "ultrasound_gest_age_selection", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "options": [ - { - "key": "ultrasound", - "text": "{{anc_profile.step2.ultrasound_gest_age_selection.options.ultrasound.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159618AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "extra_info": "GA: {ultrasound_gest_age} \u003cbr/\u003e EDD: {ultrasound_edd}" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step2.ultrasound_gest_age_selection.v_required.err}}" - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "sfh_gest_age_selection", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "options": [ - { - "key": "sfh", - "text": "{{anc_profile.step2.sfh_gest_age_selection.options.sfh.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "extra_info": "GA: {sfh_gest_age} \u003cbr/\u003e EDD: {sfh_edd}" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step2.sfh_gest_age_selection.v_required.err}}" - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "lmp_ultrasound_gest_age_selection", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "options": [ - { - "key": "lmp", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "text": "{{anc_profile.step2.lmp_ultrasound_gest_age_selection.options.lmp.text}}", - "extra_info": "GA: {lmp_gest_age}\u003cbr/\u003eEDD: {lmp_edd}" - }, - { - "key": "ultrasound", - "text": "{{anc_profile.step2.lmp_ultrasound_gest_age_selection.options.ultrasound.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159618AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "extra_info": "GA: {ultrasound_gest_age} \u003cbr/\u003e EDD: {ultrasound_edd}" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step2.lmp_ultrasound_gest_age_selection.v_required.err}}" - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "sfh_ultrasound_gest_age_selection", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "options": [ - { - "key": "ultrasound", - "text": "{{anc_profile.step2.sfh_ultrasound_gest_age_selection.options.ultrasound.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159618AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "extra_info": "GA: {ultrasound_gest_age} \u003cbr/\u003e EDD: {ultrasound_edd}" - }, - { - "key": "sfh", - "text": "{{anc_profile.step2.sfh_ultrasound_gest_age_selection.options.sfh.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "extra_info": "GA: {sfh_gest_age} \u003cbr/\u003e EDD: {sfh_edd}" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step2.sfh_ultrasound_gest_age_selection.v_required.err}}" - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "select_gest_age_edd_all_values", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "select_gest_age_edd_lmp_ultrasound", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "select_gest_age_edd_sfh_ultrasound", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "select_gest_age_edd", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "gest_age", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1438AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "gest_age_openmrs", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "edd", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - } - ] - }, - "step3": { - "title": "{{anc_profile.step3.title}}", - "next": "step4", - "fields": [ - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "20dp" - }, - { - "key": "gravida_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_profile.step3.gravida_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.gravida_label.v_required.err}}" - } - }, - { - "key": "gravida", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5624AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "numbers_selector", - "number_of_selectors": "5", - "start_number": "1", - "max_value": "15", - "text_size": "16px", - "text_color": "#000000", - "selected_text_color": "#ffffff", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.gravida.v_required.err}}" - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "previous_pregnancies", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.previous_pregnancies.v_required.err}}" - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "24dp" - }, - { - "key": "miscarriages_abortions_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_profile.step3.miscarriages_abortions_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "miscarriages_abortions", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1823AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "numbers_selector", - "number_of_selectors": "5", - "start_number": "0", - "max_value": "15", - "text_size": "16px", - "text_color": "#000000", - "selected_text_color": "#ffffff", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.miscarriages_abortions.v_required.err}}" - }, - "constraints": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_constraint_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "24dp" - }, - { - "key": "live_births_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_profile.step3.live_births_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "live_births", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160601AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "numbers_selector", - "number_of_selectors": "5", - "start_number": "0", - "max_value": "15", - "text_size": "16px", - "text_color": "#000000", - "selected_text_color": "#ffffff", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.live_births.v_required.err}}" - }, - "constraints": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_constraint_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "24dp" - }, - { - "key": "last_live_birth_preterm", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{anc_profile.step3.last_live_birth_preterm.label}}", - "text_color": "#000000", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_profile.step3.last_live_birth_preterm.options.yes.text}}", - "openmrs_entity": "", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_profile.step3.last_live_birth_preterm.options.no.text}}", - "openmrs_entity": "", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "dont_know", - "text": "{{anc_profile.step3.last_live_birth_preterm.options.dont_know.text}}", - "openmrs_entity": "", - "openmrs_entity_id": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - }, - "v_required": { - "value": false, - "err": "{{anc_profile.step3.last_live_birth_preterm.v_required.err}}" - } - }, - { - "key": "stillbirths_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_profile.step3.stillbirths_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.stillbirths_label.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "stillbirths", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160077AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "numbers_selector", - "number_of_selectors": "5", - "start_number": "0", - "max_value": "15", - "text_size": "16px", - "text_color": "#000000", - "selected_text_color": "#ffffff", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.stillbirths.v_required.err}}" - }, - "constraints": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_constraint_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "parity", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "24dp" - }, - { - "key": "c_sections_label", - "type": "label", - "label_text_style": "bold", - "text": "{{anc_profile.step3.c_sections_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "c_sections", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160081AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "numbers_selector", - "number_of_selectors": "5", - "start_number": "0", - "max_value": "15", - "text_size": "16px", - "text_color": "#000000", - "selected_text_color": "#ffffff", - "v_required": { - "value": true, - "err": "{{anc_profile.step3.c_sections.v_required.err}}" - }, - "constraints": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_constraint_rules.yml" - } - } - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "24dp" - }, - { - "key": "prev_preg_comps", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1430AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select multiple", - "type": "check_box", - "label": "{{anc_profile.step3.prev_preg_comps.label}}", - "label_text_style": "bold", - "exclusive": [ - "none", - "dont_know" - ], - "options": [ - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "none", - "text": "{{anc_profile.step3.prev_preg_comps.options.none.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "dont_know", - "text": "{{anc_profile.step3.prev_preg_comps.options.dont_know.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "129251AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "pre_eclampsia", - "text": "{{anc_profile.step3.prev_preg_comps.options.pre_eclampsia.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "118744AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "eclampsia", - "text": "{{anc_profile.step3.prev_preg_comps.options.eclampsia.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "113054AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "convulsions", - "text": "{{anc_profile.step3.prev_preg_comps.options.convulsions.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1449AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "gestational_diabetes", - "text": "{{anc_profile.step3.prev_preg_comps.options.gestational_diabetes.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "tobacco_use", - "text": "{{anc_profile.step3.prev_preg_comps.options.tobacco_use.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "143098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "alcohol_use", - "text": "{{anc_profile.step3.prev_preg_comps.options.alcohol_use.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160246AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "illicit_substance", - "text": "{{anc_profile.step3.prev_preg_comps.options.illicit_substance.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "230AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "heavy_bleeding", - "text": "{{anc_profile.step3.prev_preg_comps.options.heavy_bleeding.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165259AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "baby_died_in_24_hrs", - "text": "{{anc_profile.step3.prev_preg_comps.options.baby_died_in_24_hrs.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "140951AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "macrosomia", - "text": "{{anc_profile.step3.prev_preg_comps.options.macrosomia.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "118159AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "vacuum_delivery", - "text": "{{anc_profile.step3.prev_preg_comps.options.vacuum_delivery.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "vacuum", - "text": "{{anc_profile.step3.prev_preg_comps.options.vacuum.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "124858AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "3rd_degree_tear", - "text": "{{anc_profile.step3.prev_preg_comps.options.3rd_degree_tear.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "other", - "text": "{{anc_profile.step3.prev_preg_comps.options.other.text}}" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step3.prev_preg_comps.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "prev_preg_comps_other", - "openmrs_entity_parent": "1430AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step3.prev_preg_comps_other.hint}}", - "relevance": { - "step3:prev_preg_comps": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - }, - "v_required": { - "value": false, - "err": "{{anc_profile.step3.prev_preg_comps_other.v_required.err}}" - }, - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_profile.step3.prev_preg_comps_other.v_regex.err}}" - } - }, - { - "key": "substances_used", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select multiple", - "type": "check_box", - "label": "{{anc_profile.step3.substances_used.label}}", - "label_text_style": "bold", - "relevance": { - "step3:prev_preg_comps": { - "ex-checkbox": [ - { - "or": [ - "illicit_substance" - ] - } - ] - } - }, - "options": [ - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165221AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "marijuana", - "text": "{{anc_profile.step3.substances_used.options.marijuana.text}}", - "translation_text": "anc_profile.step3.substances_used.options.marijuana.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "155793AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "cocaine", - "text": "{{anc_profile.step3.substances_used.options.cocaine.text}}", - "translation_text": "anc_profile.step3.substances_used.options.cocaine.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "157351AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "injectable_drugs", - "text": "{{anc_profile.step3.substances_used.options.injectable_drugs.text}}", - "translation_text": "anc_profile.step3.substances_used.options.injectable_drugs.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "other", - "text": "{{anc_profile.step3.substances_used.options.other.text}}", - "translation_text": "anc_profile.step3.substances_used.options.other.text" - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step3.substances_used.v_required.err}}" - } - }, - { - "key": "substances_used_other", - "openmrs_entity_parent": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step3.substances_used_other.hint}}", - "relevance": { - "step3:substances_used": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - }, - "v_required": { - "value": false, - "err": "{{anc_profile.step3.substances_used_other.v_required.err}}" - }, - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_profile.step3.substances_used_other.v_regex.err}}" - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "preeclampsia_risk", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "pre_eclampsia_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step3.pre_eclampsia_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step3.pre_eclampsia_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step3.pre_eclampsia_toaster.toaster_info_title}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "gdm_risk", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "gestational_diabetes_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step3.gestational_diabetes_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step3.gestational_diabetes_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step3.gestational_diabetes_toaster.toaster_info_title}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - } - ] - }, - "step4": { - "title": "{{anc_profile.step4.title}}", - "next": "step5", - "fields": [ - { - "key": "allergies", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select multiple", - "type": "check_box", - "label": "{{anc_profile.step4.allergies.label}}", - "label_text_style": "bold", - "hint": "{{anc_profile.step4.allergies.hint}}", - "exclusive": [ - "none", - "dont_know" - ], - "options": [ - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "none", - "text": "{{anc_profile.step4.allergies.options.none.text}}", - "translation_text": "anc_profile.step4.allergies.options.none.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "dont_know", - "text": "{{anc_profile.step4.allergies.options.dont_know.text}}", - "translation_text": "anc_profile.step4.allergies.options.dont_know.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "70439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "albendazole", - "text": "{{anc_profile.step4.allergies.options.albendazole.text}}", - "translation_text": "anc_profile.step4.allergies.options.albendazole.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "70991AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "aluminium_hydroxide", - "text": "{{anc_profile.step4.allergies.options.aluminium_hydroxide.text}}", - "translation_text": "anc_profile.step4.allergies.options.aluminium_hydroxide.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "calcium", - "text": "{{anc_profile.step4.allergies.options.calcium.text}}", - "translation_text": "anc_profile.step4.allergies.options.calcium.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "73154AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "chamomile", - "text": "{{anc_profile.step4.allergies.options.chamomile.text}}", - "translation_text": "anc_profile.step4.allergies.options.chamomile.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "76613AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "folic_acid", - "text": "{{anc_profile.step4.allergies.options.folic_acid.text}}", - "translation_text": "anc_profile.step4.allergies.options.folic_acid.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "77001AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "ginger", - "text": "{{anc_profile.step4.allergies.options.ginger.text}}", - "translation_text": "anc_profile.step4.allergies.options.ginger.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "78218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "iron", - "text": "{{anc_profile.step4.allergies.options.iron.text}}", - "translation_text": "anc_profile.step4.allergies.options.iron.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "79229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "magnesium_carbonate", - "text": "{{anc_profile.step4.allergies.options.magnesium_carbonate.text}}", - "translation_text": "anc_profile.step4.allergies.options.magnesium_carbonate.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "924AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "malaria_medication", - "text": "{{anc_profile.step4.allergies.options.malaria_medication.text}}", - "translation_text": "anc_profile.step4.allergies.options.malaria_medication.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "79413AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "mebendazole", - "text": "{{anc_profile.step4.allergies.options.mebendazole.text}}", - "translation_text": "anc_profile.step4.allergies.options.mebendazole.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "81724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "penicillin", - "text": "{{anc_profile.step4.allergies.options.penicillin.text}}", - "translation_text": "anc_profile.step4.allergies.options.penicillin.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "84797AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "prep_tenofovir_disoproxil_fumarate", - "text": "{{anc_profile.step4.allergies.options.prep_tenofovir_disoproxil_fumarate.text}}", - "translation_text": "anc_profile.step4.allergies.options.prep_tenofovir_disoproxil_fumarate.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "other", - "text": "{{anc_profile.step4.allergies.options.other.text}}", - "translation_text": "anc_profile.step4.allergies.options.other.text" - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step4.allergies.v_required.err}}" - } - }, - { - "key": "allergies_other", - "openmrs_entity_parent": "160643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step4.allergies_other.hint}}", - "edit_type": "edit_text", - "relevance": { - "step4:allergies": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "surgeries", - "openmrs_entity_parent": "160714AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "1651AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select multiple", - "type": "check_box", - "label": "{{anc_profile.step4.surgeries.label}}", - "label_text_style": "bold", - "hint": "{{anc_profile.step4.surgeries.hint}}", - "exclusive": [ - "none", - "dont_know" - ], - "options": [ - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "none", - "text": "{{anc_profile.step4.surgeries.options.none.text}}", - "translation_text": "anc_profile.step4.surgeries.options.none.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "dont_know", - "text": "{{anc_profile.step4.surgeries.options.dont_know.text}}", - "translation_text": "anc_profile.step4.surgeries.options.dont_know.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1637AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "dilation_and_curettage", - "text": "{{anc_profile.step4.surgeries.options.dilation_and_curettage.text}}", - "translation_text": "anc_profile.step4.surgeries.options.dilation_and_curettage.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "161829AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "removal_of_fibroid", - "text": "{{anc_profile.step4.surgeries.options.removal_of_fibroid.text}}", - "translation_text": "anc_profile.step4.surgeries.options.removal_of_fibroid.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165262AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "removal_of_ovarian_cysts", - "text": "{{anc_profile.step4.surgeries.options.removal_of_ovarian_cysts.text}}", - "translation_text": "anc_profile.step4.surgeries.options.removal_of_ovarian_cysts.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "161844AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "removal_of_ovary", - "text": "{{anc_profile.step4.surgeries.options.removal_of_ovary.text}}", - "translation_text": "anc_profile.step4.surgeries.options.removal_of_ovary.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "161835AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "removal_of_the_tube", - "text": "{{anc_profile.step4.surgeries.options.removal_of_the_tube.text}}", - "translation_text": "anc_profile.step4.surgeries.options.removal_of_the_tube.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "162811AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "cervical_cone", - "text": "{{anc_profile.step4.surgeries.options.cervical_cone.text}}", - "translation_text": "anc_profile.step4.surgeries.options.cervical_cone.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165263AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "other_gynecological_procedures", - "text": "{{anc_profile.step4.surgeries.options.other_gynecological_procedures.text}}", - "translation_text": "anc_profile.step4.surgeries.options.other_gynecological_procedures.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "other", - "text": "{{anc_profile.step4.surgeries.options.other.text}}", - "translation_text": "anc_profile.step4.surgeries.options.other.text" - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step4.surgeries.v_required.err}}" - } - }, - { - "key": "surgeries_other_gyn_proced", - "openmrs_entity_parent": "165263AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165264AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step4.surgeries_other_gyn_proced.hint}}", - "edit_type": "edit_text", - "other_for": { - "parent_key": "surgeries", - "label": "Other gynecological procedures (specify)" - }, - "relevance": { - "step4:surgeries": { - "ex-checkbox": [ - { - "or": [ - "other_gynecological_procedures" - ] - } - ] - } - }, - "v_required": { - "value": false, - "err": "{{anc_profile.step4.surgeries_other_gyn_proced.v_required.err}}" - } - }, - { - "key": "surgeries_other", - "openmrs_entity_parent": "160714AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step4.surgeries_other.hint}}", - "edit_type": "edit_text", - "v_required": { - "value": false, - "err": "{{anc_profile.step4.surgeries_other.v_required.err}}" - }, - "relevance": { - "step4:surgeries": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "health_conditions", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1628AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select multiple", - "type": "check_box", - "label": "{{anc_profile.step4.health_conditions.label}}", - "label_text_style": "bold", - "hint": "{{anc_profile.step4.health_conditions.hint}}", - "exclusive": [ - "none", - "dont_know" - ], - "options": [ - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "none", - "text": "{{anc_profile.step4.health_conditions.options.none.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.none.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "dont_know", - "text": "{{anc_profile.step4.health_conditions.options.dont_know.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.dont_know.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "148117AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "autoimmune_disease", - "text": "{{anc_profile.step4.health_conditions.options.autoimmune_disease.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.autoimmune_disease.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165223AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "blood_disorder", - "text": "{{anc_profile.step4.health_conditions.options.blood_disorder.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.blood_disorder.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "151286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "cancer", - "text": "{{anc_profile.step4.health_conditions.options.cancer.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.cancer.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "cancer_other", - "text": "{{anc_profile.step4.health_conditions.options.cancer_other.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.cancer_other.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "gest_diabetes", - "text": "{{anc_profile.step4.health_conditions.options.gest_diabetes.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.gest_diabetes.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "diabetes_other", - "text": "{{anc_profile.step4.health_conditions.options.diabetes_other.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.diabetes_other.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "119481AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "diabetes", - "text": "{{anc_profile.step4.health_conditions.options.diabetes.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.diabetes.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "diabetes_type2", - "text": "{{anc_profile.step4.health_conditions.options.diabetes_type2.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.diabetes_type2.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "155AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "epilepsy", - "text": "{{anc_profile.step4.health_conditions.options.epilepsy.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.epilepsy.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "hiv", - "text": "{{anc_profile.step4.health_conditions.options.hiv.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.hiv.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "117399AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "hypertension", - "text": "{{anc_profile.step4.health_conditions.options.hypertension.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.hypertension.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "6033AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "kidney_disease", - "text": "{{anc_profile.step4.health_conditions.options.kidney_disease.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.kidney_disease.text" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "other", - "text": "{{anc_profile.step4.health_conditions.options.other.text}}", - "translation_text": "anc_profile.step4.health_conditions.options.other.text" - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step4.health_conditions.v_required.err}}" - } - }, - { - "key": "health_conditions_cancer_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_profile.step4.health_conditions_cancer_other.hint}}", - "edit_type": "edit_text", - "v_required": { - "value": false, - "err": "{{anc_profile.step4.health_conditions_cancer_other.v_required.err}}" - }, - "relevance": { - "step4:health_conditions": { - "ex-checkbox": [ - { - "or": [ - "cancer_other" - ] - } - ] - } - } - }, - { - "key": "health_conditions_other", - "openmrs_entity_parent": "1628AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step4.health_conditions_other.hint}}", - "edit_type": "edit_text", - "v_required": { - "value": false, - "err": "{{anc_profile.step4.health_conditions_other.v_required.err}}" - }, - "relevance": { - "step4:health_conditions": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "preeclampsia_risk", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "pre_eclampsia_two_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step4.pre_eclampsia_two_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step4.pre_eclampsia_two_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step4.pre_eclampsia_two_toaster.toaster_info_title}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - }, - { - "key": "hiv_diagnosis_date", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160554AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{anc_profile.step4.hiv_diagnosis_date.hint}}", - "expanded": false, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - }, - "max_date": "today", - "v_required": { - "value": true, - "err": "{{anc_profile.step4.hiv_diagnosis_date.v_required.err}}" - } - }, - { - "key": "hiv_diagnosis_date_unknown", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165224AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select one", - "type": "check_box", - "label_text_style": "bold", - "options": [ - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "yes", - "text": "{{anc_profile.step4.hiv_diagnosis_date_unknown.options.yes.text}}", - "value": false - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step4.hiv_diagnosis_date_unknown.v_required.err}}" - }, - "relevance": { - "step4:health_conditions": { - "ex-checkbox": [ - { - "or": [ - "hiv" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "hiv_positive", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - } - ] - }, - "step5": { - "title": "{{anc_profile.step5.title}}", - "next": "step6", - "fields": [ - { - "key": "tt_immun_status", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165225AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step5.tt_immun_status.label}}", - "label_text_style": "bold", - "label_info_text": "{{anc_profile.step6.tt_immun_status.label_info_text}}", - "multi_relevance": true, - "options": [ - { - "key": "3_doses", - "text": "{{anc_profile.step5.tt_immun_status.options.3_doses.text}}", - "translation_text": "anc_profile.step5.tt_immun_status.options.3_doses.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "164134AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "1-4_doses", - "text": "{{anc_profile.step5.tt_immun_status.options.1-4_doses.text}}", - "translation_text": "anc_profile.step5.tt_immun_status.options.1-4_doses.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165226AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "ttcv_not_received", - "text": "{{anc_profile.step5.tt_immun_status.options.ttcv_not_received.text}}", - "translation_text": "anc_profile.step5.tt_immun_status.options.ttcv_not_received.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165227AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "unknown", - "text": "{{anc_profile.step5.tt_immun_status.options.unknown.text}}", - "translation_text": "anc_profile.step5.tt_immun_status.options.unknown.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step5.tt_immun_status.v_required.err}}" - } - }, - { - "key": "tt_immunisation_toaster", - "openers_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step5.tt_immunisation_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step5.tt_immunisation_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step5.tt_immunisation_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "step5:tt_immun_status": { - "ex-checkbox": [ - { - "or": [ - "1-4_doses", - "ttcv_not_received", - "unknown" - ] - } - ] - } - } - }, - { - "key": "fully_immunised_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step5.fully_immunised_toaster.text}}", - "text_color": "#000000", - "toaster_type": "positive", - "relevance": { - "step5:tt_immun_status": { - "ex-checkbox": [ - { - "or": [ - "3_doses" - ] - } - ] - } - } - }, - { - "key": "flu_immun_status", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165227AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step5.flu_immun_status.label}}", - "label_text_style": "bold", - "multi_relevance": true, - "options": [ - { - "key": "seasonal_flu_dose_given", - "text": "{{anc_profile.step5.flu_immun_status.options.seasonal_flu_dose_given.text}}", - "translation_text": "anc_profile.step5.flu_immun_status.options.seasonal_flu_dose_given.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "seasonal_flu_dose_missing", - "text": "{{anc_profile.step5.flu_immun_status.options.seasonal_flu_dose_missing.text}}", - "translation_text": "anc_profile.step5.flu_immun_status.options.seasonal_flu_dose_missing.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165228AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "unknown", - "text": "{{anc_profile.step5.flu_immun_status.options.unknown.text}}", - "translation_text": "anc_profile.step5.flu_immun_status.options.unknown.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step5.flu_immun_status.v_required.err}}" - } - }, - { - "key": "flu_immunisation_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step5.flu_immunisation_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step5.flu_immunisation_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step5.flu_immunisation_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "step5:flu_immun_status": { - "ex-checkbox": [ - { - "or": [ - "seasonal_flu_dose_missing", - "unknown" - ] - } - ] - } - } - }, - { - "key": "immunised_against_flu_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step5.immunised_against_flu_toaster.text}}", - "text_color": "#000000", - "toaster_type": "positive", - "relevance": { - "step5:flu_immun_status": { - "ex-checkbox": [ - { - "or": [ - "seasonal_flu_dose_given" - ] - } - ] - } - } - } - ] - }, - "step6": { - "title": "{{anc_profile.step6.title}}", - "next": "step7", - "fields": [ - { - "key": "medications", - "openmrs_entity_parent": "160741AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_profile.step6.medications.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "dont_know", - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_profile.step6.medications.options.none.text}}", - "translation_text": "anc_profile.step6.medications.options.none.text", - "value": false, - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "", - "openmrs_entity": "concept" - }, - { - "key": "dont_know", - "text": "{{anc_profile.step6.medications.options.dont_know.text}}", - "translation_text": "anc_profile.step6.medications.options.dont_know.text", - "value": false, - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "", - "openmrs_entity": "concept" - }, - { - "key": "antacids", - "text": "{{anc_profile.step6.medications.options.antacids.text}}", - "translation_text": "anc_profile.step6.medications.options.antacids.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "944AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "aspirin", - "text": "{{anc_profile.step6.medications.options.aspirin.text}}", - "translation_text": "anc_profile.step6.medications.options.aspirin.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "71617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "calcium", - "text": "{{anc_profile.step6.medications.options.calcium.text}}", - "translation_text": "anc_profile.step6.medications.options.calcium.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "doxylamine", - "text": "{{anc_profile.step6.medications.options.doxylamine.text}}", - "translation_text": "anc_profile.step6.medications.options.doxylamine.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "75229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "folic_acid", - "text": "{{anc_profile.step6.medications.options.folic_acid.text}}", - "translation_text": "anc_profile.step6.medications.options.folic_acid.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "76613AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "iron", - "text": "{{anc_profile.step6.medications.options.iron.text}}", - "translation_text": "anc_profile.step6.medications.options.iron.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "78218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "magnesium", - "text": "{{anc_profile.step6.medications.options.magnesium.text}}", - "translation_text": "anc_profile.step6.medications.options.magnesium.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "79224AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "metoclopramide", - "text": "{{anc_profile.step6.medications.options.metoclopramide.text}}", - "translation_text": "anc_profile.step6.medications.options.metoclopramide.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "79755AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "vitamina", - "text": "{{anc_profile.step6.medications.options.vitamina.text}}", - "translation_text": "anc_profile.step6.medications.options.vitamina.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "86339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "analgesic", - "text": "{{anc_profile.step6.medications.options.analgesic.text}}", - "translation_text": "anc_profile.step6.medications.options.analgesic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165231AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_convulsive", - "text": "{{anc_profile.step6.medications.options.anti_convulsive.text}}", - "translation_text": "anc_profile.step6.medications.options.anti_convulsive.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165230AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_diabetic", - "text": "{{anc_profile.step6.medications.options.anti_diabetic.text}}", - "translation_text": "anc_profile.step6.medications.options.anti_diabetic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "159460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anthelmintic", - "text": "{{anc_profile.step6.medications.options.anthelmintic.text}}", - "translation_text": "anc_profile.step6.medications.options.anthelmintic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_hypertensive", - "text": "{{anc_profile.step6.medications.options.anti_hypertensive.text}}", - "translation_text": "anc_profile.step6.medications.options.anti_hypertensive.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165237AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_malarials", - "text": "{{anc_profile.step6.medications.options.anti_malarials.text}}", - "translation_text": "anc_profile.step6.medications.options.anti_malarials.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "5839AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "antivirals", - "text": "{{anc_profile.step6.medications.options.antivirals.text}}", - "translation_text": "anc_profile.step6.medications.options.antivirals.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165236AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "arvs", - "text": "{{anc_profile.step6.medications.options.arvs.text}}", - "translation_text": "anc_profile.step6.medications.options.arvs.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "prep_hiv", - "text": "{{anc_profile.step6.medications.options.prep_hiv.text}}", - "translation_text": "anc_profile.step6.medications.options.prep_hiv.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "antitussive", - "text": "{{anc_profile.step6.medications.options.antitussive.text}}", - "translation_text": "anc_profile.step6.medications.options.antitussive.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165235AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "asthma", - "text": "{{anc_profile.step6.medications.options.asthma.text}}", - "translation_text": "anc_profile.step6.medications.options.asthma.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165234AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "cotrimoxazole", - "text": "{{anc_profile.step6.medications.options.cotrimoxazole.text}}", - "translation_text": "anc_profile.step6.medications.options.cotrimoxazole.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "105281AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "antibiotics", - "text": "{{anc_profile.step6.medications.options.antibiotics.text}}", - "translation_text": "anc_profile.step6.medications.options.antibiotics.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1195AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "hematinic", - "text": "{{anc_profile.step6.medications.options.hematinic.text}}", - "translation_text": "anc_profile.step6.medications.options.hematinic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165233AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "hemorrhoidal", - "text": "{{anc_profile.step6.medications.options.hemorrhoidal.text}}", - "translation_text": "anc_profile.step6.medications.options.hemorrhoidal.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165255AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "multivitamin", - "text": "{{anc_profile.step6.medications.options.multivitamin.text}}", - "translation_text": "anc_profile.step6.medications.options.multivitamin.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "461AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "thyroid", - "text": "{{anc_profile.step6.medications.options.thyroid.text}}", - "translation_text": "anc_profile.step6.medications.options.thyroid.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "other", - "text": "{{anc_profile.step6.medications.options.other.text}}", - "translation_text": "anc_profile.step6.medications.options.other.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step6.medications.v_required.err}}" - } - }, - { - "key": "medications_other", - "openmrs_entity_parent": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step6.medications_other.hint}}", - "edit_type": "edit_text", - "v_required": { - "value": false, - "err": "{{anc_profile.step6.medications_other.v_required.err}}" - }, - "relevance": { - "step6:medications": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - } - ] - }, - "step7": { - "title": "{{anc_profile.step7.title}}", - "next": "step8", - "fields": [ - { - "key": "caffeine_intake", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165243AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_data_type": "select multiple", - "type": "check_box", - "label": "{{anc_profile.step7.caffeine_intake.label}}", - "label_text_style": "bold", - "hint": "{{anc_profile.step7.caffeine_intake.hint}}", - "label_info_text": "{{anc_profile.step7.caffeine_intake.label_info_text}}", - "exclusive": [ - "none" - ], - "options": [ - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165239AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "commercially_brewed_coffee", - "text": "{{anc_profile.step7.caffeine_intake.options.commercially_brewed_coffee.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "tea", - "text": "{{anc_profile.step7.caffeine_intake.options.tea.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "more_than_48_pieces_squares_of_chocolate", - "text": "{{anc_profile.step7.caffeine_intake.options.more_than_48_pieces_squares_of_chocolate.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "soda", - "text": "{{anc_profile.step7.caffeine_intake.options.soda.text}}" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "none", - "text": "{{anc_profile.step7.caffeine_intake.options.none.text}}" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step7.caffeine_intake.v_required.err}}" - } - }, - { - "key": "caffeine_reduction_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step7.caffeine_reduction_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step7.caffeine_reduction_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step7.caffeine_reduction_toaster.toaster_info_title}}", - "toaster_type": "warning", - "relevance": { - "step7:caffeine_intake": { - "ex-checkbox": [ - { - "or": [ - "commercially_brewed_coffee", - "tea", - "soda", - "more_than_48_pieces_squares_of_chocolate" - ] - } - ] - } - } - }, - { - "key": "tobacco_user", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163731AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step7.tobacco_user.label}}", - "label_text_style": "bold", - "multi_relevance": true, - "options": [ - { - "key": "yes", - "text": "{{anc_profile.step7.tobacco_user.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "159450AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_profile.step7.tobacco_user.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "recently_quit", - "text": "{{anc_profile.step7.tobacco_user.options.recently_quit.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step7.tobacco_user.v_required.err}}" - } - }, - { - "key": "tobacco_cessation_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step7.tobacco_cessation_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step7.tobacco_cessation_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step7.tobacco_cessation_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "step7:tobacco_user": { - "ex-checkbox": [ - { - "or": [ - "yes", - "recently_quit" - ] - } - ] - } - } - }, - { - "key": "shs_exposure", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "152721AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step7.shs_exposure.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_profile.step7.shs_exposure.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_profile.step7.shs_exposure.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step7.shs_exposure.v_required.err}}" - } - }, - { - "key": "second_hand_smoke_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step7.second_hand_smoke_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step7.second_hand_smoke_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step7.second_hand_smoke_toaster.toaster_info_title}}", - "toaster_type": "warning", - "relevance": { - "step7:shs_exposure": { - "type": "string", - "ex": "equalTo(., \"yes\")" - } - } - }, - { - "key": "condom_use", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step7.condom_use.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "yes", - "text": "{{anc_profile.step7.condom_use.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_profile.step7.condom_use.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step7.condom_use.v_required.err}}" - } - }, - { - "key": "condom_counseling_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step7.condom_counseling_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step7.condom_counseling_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step7.condom_counseling_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "step7:condom_use": { - "type": "string", - "ex": "equalTo(., \"no\")" - } - } - }, - { - "key": "alcohol_substance_enquiry", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165268AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step7.alcohol_substance_enquiry.label}}", - "label_text_style": "bold", - "label_info_text": "{{anc_profile.step7.alcohol_substance_enquiry.label_info_text}}", - "options": [ - { - "key": "yes", - "text": "{{anc_profile.step7.alcohol_substance_enquiry.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_profile.step7.alcohol_substance_enquiry.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step7.alcohol_substance_enquiry.v_required.err}}" - } - }, - { - "key": "alcohol_substance_use", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_profile.step7.alcohol_substance_use.label}}", - "label_text_style": "bold", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_profile.step7.alcohol_substance_use.options.none.text}}", - "translation_text": "anc_profile.step7.alcohol_substance_use.options.none.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "alcohol", - "text": "{{anc_profile.step7.alcohol_substance_use.options.alcohol.text}}", - "translation_text": "anc_profile.step7.alcohol_substance_use.options.alcohol.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "143098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "marijuana", - "text": "{{anc_profile.step7.alcohol_substance_use.options.marijuana.text}}", - "translation_text": "anc_profile.step7.alcohol_substance_use.options.marijuana.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165221AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "cocaine", - "text": "{{anc_profile.step7.alcohol_substance_use.options.cocaine.text}}", - "translation_text": "anc_profile.step7.alcohol_substance_use.options.cocaine.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "155793AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "injectable_drugs", - "text": "{{anc_profile.step7.alcohol_substance_use.options.injectable_drugs.text}}", - "translation_text": "anc_profile.step7.alcohol_substance_use.options.injectable_drugs.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "157351AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{anc_profile.step7.alcohol_substance_use.options.other.text}}", - "translation_text": "anc_profile.step7.alcohol_substance_use.options.other.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_profile.step7.alcohol_substance_use.v_required.err}}" - } - }, - { - "key": "other_substance_use", - "openmrs_entity_parent": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_profile.step7.other_substance_use.hint}}", - "edit_type": "edit_text", - "v_required": { - "value": false, - "err": "{{anc_profile.step7.other_substance_use.v_required.err}}" - }, - "relevance": { - "step7:alcohol_substance_use": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "substance_use_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step7.substance_use_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step7.substance_use_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step7.substance_use_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "step7:alcohol_substance_use": { - "ex-checkbox": [ - { - "or": [ - "alcohol", - "marijuana", - "cocaine", - "injectable_drugs", - "other" - ] - } - ] - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165257AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "hiv_risk", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "hiv_counselling_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step7.hiv_counselling_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step7.hiv_counselling_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step7.hiv_counselling_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_relevance_rules.yml" - } - } - } - } - ] - }, - "step8": { - "title": "{{anc_profile.step8.title}}", - "fields": [ - { - "key": "partner_hiv_status", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1436AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_profile.step8.partner_hiv_status.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "dont_know", - "text": "{{anc_profile.step8.partner_hiv_status.options.dont_know.text}}", - "translation_text": "anc_profile.step8.partner_hiv_status.options.dont_know.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "positive", - "text": "{{anc_profile.step8.partner_hiv_status.options.positive.text}}", - "translation_text": "anc_profile.step8.partner_hiv_status.options.positive.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "negative", - "text": "{{anc_profile.step8.partner_hiv_status.options.negative.text}}", - "translation_text": "anc_profile.step8.partner_hiv_status.options.negative.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": false, - "err": "{{anc_profile.step8.partner_hiv_status.v_required.err}}" - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "partner_hiv_positive", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "bring_partners_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step8.bring_partners_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step8.bring_partners_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step8.bring_partners_toaster.toaster_info_title}}", - "toaster_type": "info", - "relevance": { - "step8:partner_hiv_status": { - "type": "string", - "ex": "equalTo(., \"dont_know\")" - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165257AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "hiv_risk", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "profile_calculation_rules.yml" - } - } - } - }, - { - "key": "hiv_risk_counselling_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_profile.step8.hiv_risk_counselling_toaster.text}}", - "text_color": "#000000", - "toaster_info_text": "{{anc_profile.step8.hiv_risk_counselling_toaster.toaster_info_text}}", - "toaster_info_title": "{{anc_profile.step8.hiv_risk_counselling_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "step8:partner_hiv_status": { - "type": "string", - "ex": "equalTo(., \"positive\")" - } - } - } - ] - }, - "properties_file_name": "anc_profile" + "validate_on_submit": true, + "display_scroll_bars": true, + "count": "8", + "encounter_type": "anc_profile", + "entity_id": "", + "relational_id": "", + "form_version": "0.0.15", + "metadata": { + "start": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "start", + "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "end": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "end", + "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "today": { + "openmrs_entity_parent": "", + "openmrs_entity": "encounter", + "openmrs_entity_id": "encounter_date" + }, + "deviceid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "deviceid", + "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "subscriberid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "subscriberid", + "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "simserial": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "simserial", + "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "phonenumber": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "phonenumber", + "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "encounter_location": "44de66fb-e6c6-4bae-92bb-386dfe626eba", + "look_up": { + "entity_id": "", + "value": "" + } + }, + "editable_fields": [ + "educ_level", + "marital_status", + "occupation", + "occupation_other", + "lmp_known", + "lmp_known_date", + "ultrasound_done", + "ultrasound_done_date", + "ultrasound_gest_age_wks", + "sfh_gest_age", + "select_gest_age_edd", + "gravida", + "previous_pregnancies", + "miscarriages_abortions", + "live_births", + "stillbirths", + "parity", + "c_sections", + "prev_preg_comps", + "allergies", + "allergies_other", + "surgeries", + "surgeries_other_gyn_proced", + "surgeries_other", + "health_conditions", + "health_conditions_other", + "hiv_diagnosis_date", + "tt_immun_status", + "flu_immun_status", + "medications", + "medications_other", + "caffeine_intake", + "tobacco_user", + "shs_exposure", + "condom_use", + "alcohol_substance_enquiry", + "alcohol_substance_use", + "other_substance_use", + "partner_hiv_status" + ], + "default_values": [ + "educ_level", + "marital_status", + "occupation", + "occupation_other", + "lmp_known", + "lmp_known_date", + "ultrasound_done", + "ultrasound_done_date", + "ultrasound_gest_age_wks", + "sfh_gest_age", + "select_gest_age_edd", + "gravida", + "previous_pregnancies", + "miscarriages_abortions", + "live_births", + "stillbirths", + "parity", + "c_sections", + "prev_preg_comps", + "allergies", + "allergies_other", + "surgeries", + "surgeries_other_gyn_proced", + "surgeries_other", + "health_conditions", + "health_conditions_other", + "hiv_diagnosis_date", + "tt_immun_status", + "flu_immun_status", + "medications", + "medications_other", + "caffeine_intake", + "tobacco_user", + "shs_exposure", + "condom_use", + "alcohol_substance_enquiry", + "alcohol_substance_use", + "other_substance_use", + "partner_hiv_status", + "lmp_gest_age_selection", + "ultrasound_gest_age_selection", + "sfh_gest_age_selection", + "lmp_ultrasound_gest_age_selection", + "sfh_ultrasound_gest_age_selection" + ], + "global_previous": [ + "age" + ], + "step1": { + "title": "{{anc_profile.step1.title}}", + "next": "step2", + "fields": [ + { + "key": "headss_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "toaster_notes", + "type": "toaster_notes", + "text": "{{anc_profile.step1.headss_toaster.text}}", + "translation_text": "anc_profile.step1.headss_toaster.text", + "text_color": "#1199F9", + "toaster_info_text": "{{anc_profile.step1.headss_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step1.headss_toaster.toaster_info_title}}", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "educ_level", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1712AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step1.educ_level.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "none", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "text": "{{anc_profile.step1.educ_level.options.none.text}}", + "translation_text": "anc_profile.step1.educ_level.options.none.text" + }, + { + "key": "dont_know", + "text": "{{anc_profile.step1.educ_level.options.dont_know.text}}", + "translation_text": "anc_profile.step1.educ_level.options.dont_know.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "elementary", + "text": "{{anc_profile.step1.educ_level.options.elementary.text}}", + "translation_text": "anc_profile.step1.educ_level.options.elementary.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "elementary" + }, + { + "key": "jhs", + "text": "{{anc_profile.step1.educ_level.options.jhs.text}}", + "translation_text": "anc_profile.step1.educ_level.options.jhs.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "jhs" + }, + { + "key": "shs", + "text": "{{anc_profile.step1.educ_level.options.shs.text}}", + "translation_text": "anc_profile.step1.educ_level.options.shs.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "shs" + }, + { + "key": "college", + "text": "{{anc_profile.step1.educ_level.options.college.text}}", + "translation_text": "anc_profile.step1.educ_level.options.college.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "college" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step1.educ_level.v_required.err}}" + } + }, + { + "key": "marital_status", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1054AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step1.marital_status.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "married", + "text": "{{anc_profile.step1.marital_status.options.married.text}}", + "translation_text": "anc_profile.step1.marital_status.options.married.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1055AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "divorced", + "text": "{{anc_profile.step1.marital_status.options.divorced.text}}", + "translation_text": "anc_profile.step1.marital_status.options.divorced.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1058AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "single", + "text": "{{anc_profile.step1.marital_status.options.single.text}}", + "translation_text": "anc_profile.step1.marital_status.options.single.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5615AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "widowed", + "text": "{{anc_profile.step1.marital_status.options.widowed.text}}", + "translation_text": "anc_profile.step1.marital_status.options.widowed.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1059AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step1.marital_status.v_required.err}}" + } + }, + { + "key": "occupation", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1542AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select multiple", + "type": "check_box", + "label": "{{anc_profile.step1.occupation.label}}", + "hint": "{{anc_profile.step1.occupation.hint}}", + "exclusive": [ + "unemployed" + ], + "label_text_style": "bold", + "options": [ + { + "key": "unemployed", + "text": "{{anc_profile.step1.occupation.options.unemployed.text}}", + "translation_text": "anc_profile.step1.occupation.options.unemployed.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "unemployed" + }, + { + "key": "student", + "text": "{{anc_profile.step1.occupation.options.student.text}}", + "translation_text": "anc_profile.step1.occupation.options.student.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "student" + }, + { + "key": "government_officer", + "text": "{{anc_profile.step1.occupation.options.government_officer.text}}", + "translation_text": "anc_profile.step1.occupation.options.government_officer.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "government_officer" + },{ + "key": "employee", + "text": "{{anc_profile.step1.occupation.options.employee.text}}", + "translation_text": "anc_profile.step1.occupation.options.employee.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "employee" + }, + { + "key": "enterpreneur", + "text": "{{anc_profile.step1.occupation.options.enterpreneur.text}}", + "translation_text": "anc_profile.step1.occupation.options.enterpreneur.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "enterpreneur" + }, + { + "key": "housewife", + "text": "{{anc_profile.step1.occupation.options.housewife.text}}", + "translation_text": "anc_profile.step1.occupation.options.housewife.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "housewife" + }, + { + "key": "informal_employment_sex_worker", + "text": "{{anc_profile.step1.occupation.options.informal_employment_sex_worker.text}}", + "translation_text": "anc_profile.step1.occupation.options.informal_employment_sex_worker.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "informal_employment_sex_worker" + }, + { + "key": "other", + "text": "{{anc_profile.step1.occupation.options.other.text}}", + "translation_text": "anc_profile.step1.occupation.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "other" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step1.occupation.v_required.err}}" + } + }, + { + "key": "occupation_other", + "openmrs_entity_parent": "1542AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step1.occupation_other.hint}}", + "edit_type": "name", + "relevance": { + "step1:occupation": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + }, + "v_required": { + "value": false, + "err": "{{anc_profile.step1.occupation_other.v_required.err}}" + }, + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_profile.step1.occupation_other.v_regex.err}}" + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165257AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "hiv_risk", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "hiv_risk_counseling_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "Counselling (Human immunodeficiency virus [HIV] counselling)", + "openmrs_entity_id": "2047", + "type": "toaster_notes", + "text": "{{anc_profile.step1.hiv_risk_counseling_toaster.text}}", + "translation_text": "anc_profile.step1.hiv_risk_counseling_toaster.text", + "toaster_info_text": "{{anc_profile.step1.hiv_risk_counseling_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step1.hiv_risk_counseling_toaster.toaster_info_title}}", + "toaster_type": "problem", + "text_color": "#CF0800", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + } + ] + }, + "step2": { + "title": "{{anc_profile.step2.title}}", + "next": "step3", + "fields": [ + { + "key": "lmp_known", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165258AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step2.lmp_known.label}}", + "label_info_text": "{{anc_profile.step2.lmp_known.label_info_text}}", + "label_info_title": "{{anc_profile.step2.lmp_known.label_info_title}}", + "label_text_style": "bold", + "max_date": "today", + "secondary_value_field":"lmp_known_date", + "options": [ + { + "key": "yes", + "text": "{{anc_profile.step2.lmp_known.options.yes.text}}", + "translation_text": "anc_profile.step2.lmp_known.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "specify_info": "tentukkan tanggal", + "specify_widget": "date_picker", + "max_date": "today-14d", + "min_date": "today-14m" + }, + { + "key": "no", + "text": "{{anc_profile.step2.lmp_known.options.no.text}}", + "translation_text": "anc_profile.step2.lmp_known.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step2.lmp_known.v_required.err}}" + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "lmp_known_date", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "lmp_edd", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "lmp_gest_age", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "ultrasound_done", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step2.ultrasound_done.label}}", + "label_info_text": "{{anc_profile.step2.ultrasound_done.label_info_text}}", + "label_info_title": "{{anc_profile.step2.ultrasound_done.label_info_title}}", + "secondary_value_field": "ultrasound_done_date", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_profile.step2.ultrasound_done.options.yes.text}}", + "translation_text": "anc_profile.step2.ultrasound_done.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "specify_info": "tanggal USG", + "specify_widget": "date_picker", + "max_date": "today", + "min_date": "today-14m", + "default": "today" + }, + { + "key": "no", + "text": "{{anc_profile.step2.ultrasound_done.options.no.text}}", + "translation_text": "anc_profile.step2.ultrasound_done.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step2.ultrasound_done.v_required.err}}" + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "163165AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "ultrasound_done_date", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "ultrasound_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "toaster_notes", + "type": "toaster_notes", + "text": "{{anc_profile.step2.ultrasound_toaster.text}}", + "translation_text": "anc_profile.step2.ultrasound_toaster.text", + "text_color": "#1199F9", + "toaster_info_text": "{{anc_profile.step2.ultrasound_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step2.ultrasound_toaster.toaster_info_title}}", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "facility_in_us_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "toaster_notes", + "type": "toaster_notes", + "text": "{{anc_profile.step2.facility_in_us_toaster.text}}", + "translation_text": "anc_profile.step2.facility_in_us_toaster.text", + "text_color": "#1199F9", + "toaster_info_text": "{{anc_profile.step2.facility_in_us_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step2.facility_in_us_toaster.toaster_info_title}}", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "ultrasound_gest_age_wks", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_profile.step2.ultrasound_gest_age_wks.hint}}", + "relevance": { + "step2:ultrasound_done": { + "type": "string", + "ex": "equalTo(., \"yes\")" + } + }, + "v_required": { + "value": true, + "err": "{{anc_profile.step2.ultrasound_gest_age_wks.v_required.err}}" + }, + "v_numeric_integer": { + "value": true, + "err": "{{anc_profile.step2.ultrasound_gest_age_wks.v_numeric_integer.err}}" + }, + "v_min": { + "value": "4", + "err": "{{anc_profile.step2.ultrasound_gest_age_wks.v_min.err}}" + }, + "v_max": { + "value": "40", + "err": "{{anc_profile.step2.ultrasound_gest_age_wks.v_max.err}}" + } + }, + { + "key": "ultrasound_gest_age_days", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_profile.step2.ultrasound_gest_age_days.hint}}", + "relevance": { + "step2:ultrasound_done": { + "type": "string", + "ex": "equalTo(., \"yes\")" + } + }, + "v_required": { + "value": false, + "err": "{{anc_profile.step2.ultrasound_gest_age_days.v_required.err}}" + }, + "v_numeric_integer": { + "value": true, + "err": "{{anc_profile.step2.ultrasound_gest_age_days.v_numeric_integer.err}}" + }, + "v_min": { + "value": "1", + "err": "{{anc_profile.step2.ultrasound_gest_age_days.v_min.err}}" + }, + "v_max": { + "value": "6", + "err": "{{anc_profile.step2.ultrasound_gest_age_days.v_max.err}}" + } + }, + { + "key": "ultrasound_gest_age_concept", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "165220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "ultrasound_edd", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "ultrasound_ga_hidden", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "ultrasound_gest_age", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "sfh_gest_age", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "label_info_text": "{{anc_profile.step2.sfh_gest_age.label_info_text}}", + "label_info_title": "{{anc_profile.step2.sfh_gest_age.label_info_title}}", + "hint": "{{anc_profile.step2.sfh_gest_age.hint}}", + "v_required": { + "value": true, + "err": "{{anc_profile.step2.sfh_gest_age.v_required.err}}" + }, + "v_numeric_integer": { + "value": true, + "err": "{{anc_profile.step2.sfh_gest_age.v_numeric_integer.err}}" + }, + "v_min": { + "value": "4", + "err": "{{anc_profile.step2.sfh_gest_age.v_min.err}}" + }, + "v_max": { + "value": "40", + "err": "{{anc_profile.step2.sfh_gest_age.v_max.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "sfh_edd", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "sfh_ga_hidden", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "select_gest_age_edd_label", + "type": "label", + "text": "{{anc_profile.step2.select_gest_age_edd_label.text}}", + "translation_text": "anc_profile.step2.select_gest_age_edd_label.text", + "label_info_text": "{{anc_profile.step2.select_gest_age_edd_label.label_info_text}}", + "label_text_style": "bold", + "text_color": "#000000", + "v_required": { + "value": true, + "err": "{{anc_profile.step2.select_gest_age_edd_label.v_required.err}}" + } + }, + { + "key": "lmp_gest_age_selection", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "options": [ + { + "key": "lmp", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "text": "{{anc_profile.step2.lmp_gest_age_selection.options.lmp.text}}", + "translation_text": "anc_profile.step2.lmp_gest_age_selection.options.lmp.text", + "extra_info": "Usia Kehamilan: {lmp_gest_age}
HPL: {lmp_edd}" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step2.lmp_gest_age_selection.v_required.err}}" + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "ultrasound_gest_age_selection", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "options": [ + { + "key": "ultrasound", + "text": "{{anc_profile.step2.ultrasound_gest_age_selection.options.ultrasound.text}}", + "translation_text": "anc_profile.step2.ultrasound_gest_age_selection.options.ultrasound.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "159618AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "extra_info": "Usia Kehamilan: {ultrasound_gest_age}
HPL: {ultrasound_edd} " + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step2.ultrasound_gest_age_selection.v_required.err}}" + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "sfh_gest_age_selection", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "options": [ + { + "key": "sfh", + "text": "{{anc_profile.step2.sfh_gest_age_selection.options.sfh.text}}", + "translation_text": "anc_profile.step2.sfh_gest_age_selection.options.sfh.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "extra_info": "Usia Kehamilan: {sfh_gest_age}
HPL: {sfh_edd} " + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step2.sfh_gest_age_selection.v_required.err}}" + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "lmp_ultrasound_gest_age_selection", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "options": [ + { + "key": "lmp", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "text": "{{anc_profile.step2.lmp_ultrasound_gest_age_selection.options.lmp.text}}", + "translation_text": "anc_profile.step2.lmp_ultrasound_gest_age_selection.options.lmp.text", + "extra_info": "Usia Kehamilan: {lmp_gest_age}
HPL: {lmp_edd} " + }, + { + "key": "ultrasound", + "text": "{{anc_profile.step2.lmp_ultrasound_gest_age_selection.options.ultrasound.text}}", + "translation_text": "anc_profile.step2.lmp_ultrasound_gest_age_selection.options.ultrasound.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "159618AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "extra_info": "Usia Kehamilan: {ultrasound_gest_age}
HPL: {ultrasound_edd} " + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step2.lmp_ultrasound_gest_age_selection.v_required.err}}" + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "sfh_ultrasound_gest_age_selection", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "options": [ + { + "key": "ultrasound", + "text": "{{anc_profile.step2.sfh_ultrasound_gest_age_selection.options.ultrasound.text}}", + "translation_text": "anc_profile.step2.sfh_ultrasound_gest_age_selection.options.ultrasound.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "159618AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "extra_info": "Usia Kehamilan: {ultrasound_gest_age}
HPL: {ultrasound_edd} " + }, + { + "key": "sfh", + "text": "{{anc_profile.step2.sfh_ultrasound_gest_age_selection.options.sfh.text}}", + "translation_text": "anc_profile.step2.sfh_ultrasound_gest_age_selection.options.sfh.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "extra_info": "Usia Kehamilan: {sfh_gest_age}
HPL: {sfh_edd} " + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step2.sfh_ultrasound_gest_age_selection.v_required.err}}" + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "select_gest_age_edd_all_values", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "select_gest_age_edd_lmp_ultrasound", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "select_gest_age_edd_sfh_ultrasound", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "select_gest_age_edd", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "gest_age", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1438AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "gest_age_openmrs", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "edd", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + } + ] + }, + "step3": { + "title": "{{anc_profile.step3.title}}", + "next": "step4", + "fields": [ + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "20dp" + }, + { + "key": "gravida_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_profile.step3.gravida_label.text}}", + "translation_text": "anc_profile.step3.gravida_label.text", + "text_color": "#000000", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.gravida_label.v_required.err}}" + } + }, + { + "key": "gravida", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5624AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "numbers_selector", + "number_of_selectors": "5", + "start_number": "1", + "max_value": "15", + "text_size": "16px", + "text_color": "#000000", + "selected_text_color": "#ffffff", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.gravida.v_required.err}}" + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "previous_pregnancies", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.previous_pregnancies.v_required.err}}" + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "24dp" + }, + { + "key": "miscarriages_abortions_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_profile.step3.miscarriages_abortions_label.text}}", + "translation_text": "anc_profile.step3.miscarriages_abortions_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "miscarriages_abortions", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1823AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "numbers_selector", + "number_of_selectors": "5", + "start_number": "0", + "max_value": "15", + "text_size": "16px", + "text_color": "#000000", + "selected_text_color": "#ffffff", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.miscarriages_abortions.v_required.err}}" + }, + "constraints": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_constraint_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "24dp" + }, + { + "key": "live_births_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_profile.step3.live_births_label.text}}", + "translation_text": "anc_profile.step3.live_births_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "live_births", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160601AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "numbers_selector", + "number_of_selectors": "5", + "start_number": "0", + "max_value": "15", + "text_size": "16px", + "text_color": "#000000", + "selected_text_color": "#ffffff", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.live_births.v_required.err}}" + }, + "constraints": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_constraint_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "24dp" + }, + { + "key": "last_live_birth_preterm", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "native_radio", + "label": "{{anc_profile.step3.last_live_birth_preterm.label}}", + "text_color": "#000000", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_profile.step3.last_live_birth_preterm.options.yes.text}}", + "translation_text": "anc_profile.step3.last_live_birth_preterm.options.yes.text", + "openmrs_entity": "", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_profile.step3.last_live_birth_preterm.options.no.text}}", + "translation_text": "anc_profile.step3.last_live_birth_preterm.options.no.text", + "openmrs_entity": "", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "dont_know", + "text": "{{anc_profile.step3.last_live_birth_preterm.options.dont_know.text}}", + "translation_text": "anc_profile.step3.last_live_birth_preterm.options.dont_know.text", + "openmrs_entity": "", + "openmrs_entity_id": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + }, + "v_required": { + "value": false, + "err": "{{anc_profile.step3.last_live_birth_preterm.v_required.err}}" + } + }, + { + "key": "stillbirths_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_profile.step3.stillbirths_label.text}}", + "translation_text": "anc_profile.step3.stillbirths_label.text", + "text_color": "#000000", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.stillbirths_label.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "stillbirths", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160077AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "numbers_selector", + "number_of_selectors": "5", + "start_number": "0", + "max_value": "15", + "text_size": "16px", + "text_color": "#000000", + "selected_text_color": "#ffffff", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.stillbirths.v_required.err}}" + }, + "constraints": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_constraint_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "parity", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "24dp" + }, + { + "key": "c_sections_label", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_profile.step3.c_sections_label.text}}", + "translation_text": "anc_profile.step3.c_sections_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "c_sections", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160081AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "numbers_selector", + "number_of_selectors": "5", + "start_number": "0", + "max_value": "15", + "text_size": "16px", + "text_color": "#000000", + "selected_text_color": "#ffffff", + "v_required": { + "value": true, + "err": "{{anc_profile.step3.c_sections.v_required.err}}" + }, + "constraints": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_constraint_rules.yml" + } + } + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "24dp" + }, + { + "key": "prev_preg_comps", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1430AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select multiple", + "type": "check_box", + "label": "{{anc_profile.step3.prev_preg_comps.label}}", + "label_text_style": "bold", + "exclusive": [ + "none", + "dont_know" + ], + "options": [ + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "none", + "text": "{{anc_profile.step3.prev_preg_comps.options.none.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.none.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "dont_know", + "text": "{{anc_profile.step3.prev_preg_comps.options.dont_know.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.dont_know.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "hypertension", + "key": "hypertension", + "text": "{{anc_profile.step3.prev_preg_comps.options.hypertension.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.hypertension.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "129251AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "pre_eclampsia", + "text": "{{anc_profile.step3.prev_preg_comps.options.pre_eclampsia.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.pre_eclampsia.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "118744AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "eclampsia", + "text": "{{anc_profile.step3.prev_preg_comps.options.eclampsia.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.eclampsia.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "113054AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "convulsions", + "text": "{{anc_profile.step3.prev_preg_comps.options.convulsions.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.convulsions.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1449AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "gestational_diabetes", + "text": "{{anc_profile.step3.prev_preg_comps.options.gestational_diabetes.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.gestational_diabetes.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "159084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "tobacco_use", + "text": "{{anc_profile.step3.prev_preg_comps.options.tobacco_use.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.tobacco_use.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "143098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "alcohol_use", + "text": "{{anc_profile.step3.prev_preg_comps.options.alcohol_use.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.alcohol_use.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160246AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "illicit_substance", + "text": "{{anc_profile.step3.prev_preg_comps.options.illicit_substance.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.illicit_substance.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "230AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "heavy_bleeding", + "text": "{{anc_profile.step3.prev_preg_comps.options.heavy_bleeding.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.heavy_bleeding.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165259AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "baby_died_in_24_hrs", + "text": "{{anc_profile.step3.prev_preg_comps.options.baby_died_in_24_hrs.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.baby_died_in_24_hrs.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "140951AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "macrosomia", + "text": "{{anc_profile.step3.prev_preg_comps.options.macrosomia.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.macrosomia.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "118159AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "vacuum_delivery", + "text": "{{anc_profile.step3.prev_preg_comps.options.vacuum_delivery.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.vacuum_delivery.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "key": "vacuum", + "text": "{{anc_profile.step3.prev_preg_comps.options.vacuum.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.vacuum.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "124858AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "3rd_degree_tear", + "text": "{{anc_profile.step3.prev_preg_comps.options.3rd_degree_tear.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.3rd_degree_tear.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "other", + "text": "{{anc_profile.step3.prev_preg_comps.options.other.text}}", + "translation_text": "anc_profile.step3.prev_preg_comps.options.other.text" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step3.prev_preg_comps.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "prev_preg_comps_other", + "openmrs_entity_parent": "1430AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step3.prev_preg_comps_other.hint}}", + "relevance": { + "step3:prev_preg_comps": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + }, + "v_required": { + "value": false, + "err": "{{anc_profile.step3.prev_preg_comps_other.v_required.err}}" + }, + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_profile.step3.prev_preg_comps_other.v_regex.err}}" + } + }, + { + "key": "substances_used", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select multiple", + "type": "check_box", + "label": "{{anc_profile.step3.substances_used.label}}", + "label_text_style": "bold", + "relevance": { + "step3:prev_preg_comps": { + "ex-checkbox": [ + { + "or": [ + "illicit_substance" + ] + } + ] + } + }, + "options": [ + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165221AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "marijuana", + "text": "{{anc_profile.step3.substances_used.options.marijuana.text}}", + "translation_text": "anc_profile.step3.substances_used.options.marijuana.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "155793AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "cocaine", + "text": "{{anc_profile.step3.substances_used.options.cocaine.text}}", + "translation_text": "anc_profile.step3.substances_used.options.cocaine.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "157351AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "injectable_drugs", + "text": "{{anc_profile.step3.substances_used.options.injectable_drugs.text}}", + "translation_text": "anc_profile.step3.substances_used.options.injectable_drugs.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "other", + "text": "{{anc_profile.step3.substances_used.options.other.text}}", + "translation_text": "anc_profile.step3.substances_used.options.other.text" + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step3.substances_used.v_required.err}}" + } + }, + { + "key": "substances_used_other", + "openmrs_entity_parent": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step3.substances_used_other.hint}}", + "relevance": { + "step3:substances_used": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + }, + "v_required": { + "value": false, + "err": "{{anc_profile.step3.substances_used_other.v_required.err}}" + }, + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_profile.step3.substances_used_other.v_regex.err}}" + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "preeclampsia_risk", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "pre_eclampsia_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step3.pre_eclampsia_toaster.text}}", + "translation_text": "anc_profile.step3.pre_eclampsia_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step3.pre_eclampsia_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step3.pre_eclampsia_toaster.toaster_info_title}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "gdm_risk", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "gestational_diabetes_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step3.gestational_diabetes_toaster.text}}", + "translation_text": "anc_profile.step3.gestational_diabetes_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step3.gestational_diabetes_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step3.gestational_diabetes_toaster.toaster_info_title}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + } + ] + }, + "step4": { + "title": "{{anc_profile.step4.title}}", + "next": "step5", + "fields": [ + { + "key": "allergies", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select multiple", + "type": "check_box", + "label": "{{anc_profile.step4.allergies.label}}", + "label_text_style": "bold", + "hint": "{{anc_profile.step4.allergies.hint}}", + "exclusive": [ + "none", + "dont_know" + ], + "options": [ + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "none", + "text": "{{anc_profile.step4.allergies.options.none.text}}", + "translation_text": "anc_profile.step4.allergies.options.none.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "dont_know", + "text": "{{anc_profile.step4.allergies.options.dont_know.text}}", + "translation_text": "anc_profile.step4.allergies.options.dont_know.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "70439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "albendazole", + "text": "{{anc_profile.step4.allergies.options.albendazole.text}}", + "translation_text": "anc_profile.step4.allergies.options.albendazole.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "70991AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "aluminium_hydroxide", + "text": "{{anc_profile.step4.allergies.options.aluminium_hydroxide.text}}", + "translation_text": "anc_profile.step4.allergies.options.aluminium_hydroxide.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "calcium", + "text": "{{anc_profile.step4.allergies.options.calcium.text}}", + "translation_text": "anc_profile.step4.allergies.options.calcium.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "73154AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "chamomile", + "text": "{{anc_profile.step4.allergies.options.chamomile.text}}", + "translation_text": "anc_profile.step4.allergies.options.chamomile.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "76613AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "folic_acid", + "text": "{{anc_profile.step4.allergies.options.folic_acid.text}}", + "translation_text": "anc_profile.step4.allergies.options.folic_acid.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "77001AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "ginger", + "text": "{{anc_profile.step4.allergies.options.ginger.text}}", + "translation_text": "anc_profile.step4.allergies.options.ginger.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "78218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "iron", + "text": "{{anc_profile.step4.allergies.options.iron.text}}", + "translation_text": "anc_profile.step4.allergies.options.iron.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "79229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "magnesium_carbonate", + "text": "{{anc_profile.step4.allergies.options.magnesium_carbonate.text}}", + "translation_text": "anc_profile.step4.allergies.options.magnesium_carbonate.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "924AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "malaria_medication", + "text": "{{anc_profile.step4.allergies.options.malaria_medication.text}}", + "translation_text": "anc_profile.step4.allergies.options.malaria_medication.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "79413AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "mebendazole", + "text": "{{anc_profile.step4.allergies.options.mebendazole.text}}", + "translation_text": "anc_profile.step4.allergies.options.mebendazole.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "81724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "penicillin", + "text": "{{anc_profile.step4.allergies.options.penicillin.text}}", + "translation_text": "anc_profile.step4.allergies.options.penicillin.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "84797AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "prep_tenofovir_disoproxil_fumarate", + "text": "{{anc_profile.step4.allergies.options.prep_tenofovir_disoproxil_fumarate.text}}", + "translation_text": "anc_profile.step4.allergies.options.prep_tenofovir_disoproxil_fumarate.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "other", + "text": "{{anc_profile.step4.allergies.options.other.text}}", + "translation_text": "anc_profile.step4.allergies.options.other.text" + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step4.allergies.v_required.err}}" + } + }, + { + "key": "allergies_other", + "openmrs_entity_parent": "160643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step4.allergies_other.hint}}", + "edit_type": "edit_text", + "relevance": { + "step4:allergies": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "surgeries", + "openmrs_entity_parent": "160714AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "1651AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select multiple", + "type": "check_box", + "label": "{{anc_profile.step4.surgeries.label}}", + "label_text_style": "bold", + "hint": "{{anc_profile.step4.surgeries.hint}}", + "exclusive": [ + "none", + "dont_know" + ], + "options": [ + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "none", + "text": "{{anc_profile.step4.surgeries.options.none.text}}", + "translation_text": "anc_profile.step4.surgeries.options.none.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "dont_know", + "text": "{{anc_profile.step4.surgeries.options.dont_know.text}}", + "translation_text": "anc_profile.step4.surgeries.options.dont_know.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1637AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "dilation_and_curettage", + "text": "{{anc_profile.step4.surgeries.options.dilation_and_curettage.text}}", + "translation_text": "anc_profile.step4.surgeries.options.dilation_and_curettage.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "161829AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "removal_of_fibroid", + "text": "{{anc_profile.step4.surgeries.options.removal_of_fibroid.text}}", + "translation_text": "anc_profile.step4.surgeries.options.removal_of_fibroid.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165262AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "removal_of_ovarian_cysts", + "text": "{{anc_profile.step4.surgeries.options.removal_of_ovarian_cysts.text}}", + "translation_text": "anc_profile.step4.surgeries.options.removal_of_ovarian_cysts.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "161844AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "removal_of_ovary", + "text": "{{anc_profile.step4.surgeries.options.removal_of_ovary.text}}", + "translation_text": "anc_profile.step4.surgeries.options.removal_of_ovary.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "161835AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "removal_of_the_tube", + "text": "{{anc_profile.step4.surgeries.options.removal_of_the_tube.text}}", + "translation_text": "anc_profile.step4.surgeries.options.removal_of_the_tube.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "162811AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "cervical_cone", + "text": "{{anc_profile.step4.surgeries.options.cervical_cone.text}}", + "translation_text": "anc_profile.step4.surgeries.options.cervical_cone.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165263AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "other_gynecological_procedures", + "text": "{{anc_profile.step4.surgeries.options.other_gynecological_procedures.text}}", + "translation_text": "anc_profile.step4.surgeries.options.other_gynecological_procedures.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "other", + "text": "{{anc_profile.step4.surgeries.options.other.text}}", + "translation_text": "anc_profile.step4.surgeries.options.other.text" + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step4.surgeries.v_required.err}}" + } + }, + { + "key": "surgeries_other_gyn_proced", + "openmrs_entity_parent": "165263AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165264AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step4.surgeries_other_gyn_proced.hint}}", + "edit_type": "edit_text", + "other_for": { + "parent_key": "surgeries", + "label": "Prosedur ginekologi lainnya (sebutkan)" + }, + "relevance": { + "step4:surgeries": { + "ex-checkbox": [ + { + "or": [ + "other_gynecological_procedures" + ] + } + ] + } + }, + "v_required": { + "value": false, + "err": "{{anc_profile.step4.surgeries_other_gyn_proced.v_required.err}}" + } + }, + { + "key": "surgeries_other", + "openmrs_entity_parent": "160714AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step4.surgeries_other.hint}}", + "edit_type": "edit_text", + "v_required": { + "value": false, + "err": "{{anc_profile.step4.surgeries_other.v_required.err}}" + }, + "relevance": { + "step4:surgeries": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "health_conditions", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1628AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select multiple", + "type": "check_box", + "label": "{{anc_profile.step4.health_conditions.label}}", + "label_text_style": "bold", + "hint": "{{anc_profile.step4.health_conditions.hint}}", + "exclusive": [ + "none", + "dont_know" + ], + "options": [ + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "none", + "text": "{{anc_profile.step4.health_conditions.options.none.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.none.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "dont_know", + "text": "{{anc_profile.step4.health_conditions.options.dont_know.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.dont_know.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "148117AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "autoimmune_disease", + "text": "{{anc_profile.step4.health_conditions.options.autoimmune_disease.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.autoimmune_disease.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165223AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "blood_disorder", + "text": "{{anc_profile.step4.health_conditions.options.blood_disorder.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.blood_disorder.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "151286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "cancer", + "text": "{{anc_profile.step4.health_conditions.options.cancer.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.cancer.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "key": "cancer_other", + "text": "{{anc_profile.step4.health_conditions.options.cancer_other.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.cancer_other.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "key": "gest_diabetes", + "text": "{{anc_profile.step4.health_conditions.options.gest_diabetes.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.gest_diabetes.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "key": "diabetes_other", + "text": "{{anc_profile.step4.health_conditions.options.diabetes_other.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.diabetes_other.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "119481AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "diabetes", + "text": "{{anc_profile.step4.health_conditions.options.diabetes.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.diabetes.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "key": "diabetes_type2", + "text": "{{anc_profile.step4.health_conditions.options.diabetes_type2.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.diabetes_type2.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "155AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "epilepsy", + "text": "{{anc_profile.step4.health_conditions.options.epilepsy.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.epilepsy.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "hiv", + "text": "{{anc_profile.step4.health_conditions.options.hiv.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.hiv.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "117399AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "hypertension", + "text": "{{anc_profile.step4.health_conditions.options.hypertension.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.hypertension.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "6033AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "kidney_disease", + "text": "{{anc_profile.step4.health_conditions.options.kidney_disease.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.kidney_disease.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "other", + "text": "{{anc_profile.step4.health_conditions.options.other.text}}", + "translation_text": "anc_profile.step4.health_conditions.options.other.text" + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step4.health_conditions.v_required.err}}" + } + }, + { + "key": "health_conditions_cancer_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_profile.step4.health_conditions_cancer_other.hint}}", + "edit_type": "edit_text", + "v_required": { + "value": false, + "err": "{{anc_profile.step4.health_conditions_cancer_other.v_required.err}}" + }, + "relevance": { + "step4:health_conditions": { + "ex-checkbox": [ + { + "or": [ + "cancer_other" + ] + } + ] + } + } + }, + { + "key": "health_conditions_other", + "openmrs_entity_parent": "1628AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step4.health_conditions_other.hint}}", + "edit_type": "edit_text", + "v_required": { + "value": false, + "err": "{{anc_profile.step4.health_conditions_other.v_required.err}}" + }, + "relevance": { + "step4:health_conditions": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "preeclampsia_risk", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "pre_eclampsia_two_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step4.pre_eclampsia_two_toaster.text}}", + "translation_text": "anc_profile.step4.pre_eclampsia_two_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step4.pre_eclampsia_two_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step4.pre_eclampsia_two_toaster.toaster_info_title}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + }, + { + "key": "hiv_diagnosis_date", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160554AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "date_picker", + "hint": "{{anc_profile.step4.hiv_diagnosis_date.hint}}", + "expanded": false, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + }, + "max_date": "today", + "v_required": { + "value": true, + "err": "{{anc_profile.step4.hiv_diagnosis_date.v_required.err}}" + } + }, + { + "key": "hiv_diagnosis_date_unknown", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165224AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select one", + "type": "check_box", + "label_text_style": "bold", + "options": [ + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "yes", + "text": "{{anc_profile.step4.hiv_diagnosis_date_unknown.options.yes.text}}", + "translation_text": "anc_profile.step4.hiv_diagnosis_date_unknown.options.yes.text", + "value": false + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step4.hiv_diagnosis_date_unknown.v_required.err}}" + }, + "relevance": { + "step4:health_conditions": { + "ex-checkbox": [ + { + "or": [ + "hiv" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "hiv_positive", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + } + ] + }, + "step5": { + "title": "{{anc_profile.step5.title}}", + "next": "step6", + "fields": [ + { + "key": "covid_vaccine_status", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "covid_vaccine_status", + "type": "native_radio", + "label": "{{anc_profile.step5.covid_vaccine_status.label}}", + "label_text_style": "bold", + "multi_relevance": true, + "options": [ + { + "key": "partial1", + "text": "{{anc_profile.step5.covid_vaccine_status.options.partial1.text}}", + "translation_text": "anc_profile.step5.covid_vaccine_status.options.partial1.text", + "openmrs_entity_parent": "covid_vaccine_status", + "openmrs_entity": "concept", + "openmrs_entity_id": "covid_partial1" + }, + { + "key": "partial2", + "text": "{{anc_profile.step5.covid_vaccine_status.options.partial2.text}}", + "translation_text": "anc_profile.step5.covid_vaccine_status.options.partial2.text", + "openmrs_entity_parent": "covid_vaccine_status", + "openmrs_entity": "concept", + "openmrs_entity_id": "covid_partial2" + }, + { + "key": "booster1", + "text": "{{anc_profile.step5.covid_vaccine_status.options.booster1.text}}", + "translation_text": "anc_profile.step5.covid_vaccine_status.options.none.text", + "openmrs_entity_parent": "covid_vaccine_status", + "openmrs_entity": "concept", + "openmrs_entity_id": "covid_none" + }, + { + "key": "booster2", + "text": "{{anc_profile.step5.covid_vaccine_status.options.booster2.text}}", + "translation_text": "anc_profile.step5.covid_vaccine_status.options.none.text", + "openmrs_entity_parent": "covid_vaccine_status", + "openmrs_entity": "concept", + "openmrs_entity_id": "covid_none" + }, + { + "key": "none", + "text": "{{anc_profile.step5.covid_vaccine_status.options.none.text}}", + "translation_text": "anc_profile.step5.covid_vaccine_status.options.none.text", + "openmrs_entity_parent": "covid_vaccine_status", + "openmrs_entity": "concept", + "openmrs_entity_id": "covid_none" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step5.covid_vaccine_status.v_required.err}}" + } + }, + { + "key": "covid_vaccine_complete_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step5.covid_vaccine_complete_toaster.text}}", + "translation_text": "anc_profile.step5.covid_vaccine_complete_toaster.text", + "text_color": "#000000", + "toaster_type": "positive", + "relevance": { + "step5:covid_vaccine_status": { + "ex-checkbox": [ + { + "or": [ + "complete", + "booster1", + "booster2" + ] + } + ] + } + } + }, + { + "key": "covid_vaccine_partial_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step5.covid_vaccine_partial_toaster.text}}", + "translation_text": "anc_profile.step5.covid_vaccine_partial_toaster.text", + "text_color": "#000000", + "toaster_type": "info", + "relevance": { + "step5:covid_vaccine_status": { + "ex-checkbox": [ + { + "or": [ + "partial", + "partial1", + "partial2", + "none" + ] + } + ] + } + } + }, + { + "key": "tt_immun_status", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165225AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step5.tt_immun_status.label}}", + "label_text_style": "bold", + "label_info_text": "{{anc_profile.step6.tt_immun_status.label_info_text}}", + "multi_relevance": true, + "options": [ + { + "key": "3_doses", + "text": "{{anc_profile.step5.tt_immun_status.options.3_doses.text}}", + "translation_text": "anc_profile.step5.tt_immun_status.options.3_doses.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "164134AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "1-4_doses", + "text": "{{anc_profile.step5.tt_immun_status.options.1-4_doses.text}}", + "translation_text": "anc_profile.step5.tt_immun_status.options.1-4_doses.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165226AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "ttcv_not_received", + "text": "{{anc_profile.step5.tt_immun_status.options.ttcv_not_received.text}}", + "translation_text": "anc_profile.step5.tt_immun_status.options.ttcv_not_received.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165227AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "unknown", + "text": "{{anc_profile.step5.tt_immun_status.options.unknown.text}}", + "translation_text": "anc_profile.step5.tt_immun_status.options.unknown.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step5.tt_immun_status.v_required.err}}" + } + }, + { + "key": "tt_immunisation_toaster", + "openers_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step5.tt_immunisation_toaster.text}}", + "translation_text": "anc_profile.step5.tt_immunisation_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step5.tt_immunisation_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step5.tt_immunisation_toaster.toaster_info_title}}", + "toaster_type": "info", + "relevance": { + "step5:tt_immun_status": { + "ex-checkbox": [ + { + "or": [ + "1-4_doses", + "ttcv_not_received", + "unknown" + ] + } + ] + } + } + }, + { + "key": "fully_immunised_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step5.fully_immunised_toaster.text}}", + "translation_text": "anc_profile.step5.fully_immunised_toaster.text", + "text_color": "#000000", + "toaster_type": "positive", + "relevance": { + "step5:tt_immun_status": { + "ex-checkbox": [ + { + "or": [ + "3_doses" + ] + } + ] + } + } + } + ] + }, + "step6": { + "title": "{{anc_profile.step6.title}}", + "next": "step7", + "fields": [ + { + "key": "medications", + "openmrs_entity_parent": "160741AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "label": "{{anc_profile.step6.medications.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "dont_know", + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_profile.step6.medications.options.none.text}}", + "translation_text": "anc_profile.step6.medications.options.none.text", + "value": false, + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "", + "openmrs_entity": "concept" + }, + { + "key": "dont_know", + "text": "{{anc_profile.step6.medications.options.dont_know.text}}", + "translation_text": "anc_profile.step6.medications.options.dont_know.text", + "value": false, + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "", + "openmrs_entity": "concept" + }, + { + "key": "folic_acid", + "text": "{{anc_profile.step6.medications.options.folic_acid.text}}", + "translation_text": "anc_profile.step6.medications.options.folic_acid.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "76613AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "calcium", + "text": "{{anc_profile.step6.medications.options.calcium.text}}", + "translation_text": "anc_profile.step6.medications.options.calcium.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "magnesium", + "text": "{{anc_profile.step6.medications.options.magnesium.text}}", + "translation_text": "anc_profile.step6.medications.options.magnesium.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "79224AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "vitamina", + "text": "{{anc_profile.step6.medications.options.vitamina.text}}", + "translation_text": "anc_profile.step6.medications.options.vitamina.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "86339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "niacin", + "text": "{{anc_profile.step6.medications.options.niacin.text}}", + "translation_text": "anc_profile.step6.medications.options.niacin.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "niacin", + "openmrs_entity_parent": "" + }, + { + "key": "vitaminb12", + "text": "{{anc_profile.step6.medications.options.vitaminb12.text}}", + "translation_text": "anc_profile.step6.medications.options.vitaminb12.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "vitaminb12", + "openmrs_entity_parent": "" + }, + { + "key": "iron", + "text": "{{anc_profile.step6.medications.options.iron.text}}", + "translation_text": "anc_profile.step6.medications.options.iron.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "78218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "multivitamin", + "text": "{{anc_profile.step6.medications.options.multivitamin.text}}", + "translation_text": "anc_profile.step6.medications.options.multivitamin.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "461AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "analgesic", + "text": "{{anc_profile.step6.medications.options.analgesic.text}}", + "translation_text": "anc_profile.step6.medications.options.analgesic.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165231AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "antacids", + "text": "{{anc_profile.step6.medications.options.antacids.text}}", + "translation_text": "anc_profile.step6.medications.options.antacids.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "944AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_malarials", + "text": "{{anc_profile.step6.medications.options.anti_malarials.text}}", + "translation_text": "anc_profile.step6.medications.options.anti_malarials.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "5839AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "antibiotics", + "text": "{{anc_profile.step6.medications.options.antibiotics.text}}", + "translation_text": "anc_profile.step6.medications.options.antibiotics.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1195AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_diabetic", + "text": "{{anc_profile.step6.medications.options.anti_diabetic.text}}", + "translation_text": "anc_profile.step6.medications.options.anti_diabetic.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "159460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anthelmintic", + "text": "{{anc_profile.step6.medications.options.anthelmintic.text}}", + "translation_text": "anc_profile.step6.medications.options.anthelmintic.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_hypertensive", + "text": "{{anc_profile.step6.medications.options.anti_hypertensive.text}}", + "translation_text": "anc_profile.step6.medications.options.anti_hypertensive.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165237AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_convulsive", + "text": "{{anc_profile.step6.medications.options.anti_convulsive.text}}", + "translation_text": "anc_profile.step6.medications.options.anti_convulsive.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165230AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "arvs", + "text": "{{anc_profile.step6.medications.options.arvs.text}}", + "translation_text": "anc_profile.step6.medications.options.arvs.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "antitussive", + "text": "{{anc_profile.step6.medications.options.antitussive.text}}", + "translation_text": "anc_profile.step6.medications.options.antitussive.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165235AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "antivirals", + "text": "{{anc_profile.step6.medications.options.antivirals.text}}", + "translation_text": "anc_profile.step6.medications.options.antivirals.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165236AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "aspirin", + "text": "{{anc_profile.step6.medications.options.aspirin.text}}", + "translation_text": "anc_profile.step6.medications.options.aspirin.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "71617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "doxylamine", + "text": "{{anc_profile.step6.medications.options.doxylamine.text}}", + "translation_text": "anc_profile.step6.medications.options.doxylamine.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "75229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "cotrimoxazole", + "text": "{{anc_profile.step6.medications.options.cotrimoxazole.text}}", + "translation_text": "anc_profile.step6.medications.options.cotrimoxazole.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "105281AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "metoclopramide", + "text": "{{anc_profile.step6.medications.options.metoclopramide.text}}", + "translation_text": "anc_profile.step6.medications.options.metoclopramide.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "79755AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "hemorrhoidal", + "text": "{{anc_profile.step6.medications.options.hemorrhoidal.text}}", + "translation_text": "anc_profile.step6.medications.options.hemorrhoidal.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165255AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "asthma", + "text": "{{anc_profile.step6.medications.options.asthma.text}}", + "translation_text": "anc_profile.step6.medications.options.asthma.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165234AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "thyroid", + "text": "{{anc_profile.step6.medications.options.thyroid.text}}", + "translation_text": "anc_profile.step6.medications.options.thyroid.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "prep_hiv", + "text": "{{anc_profile.step6.medications.options.prep_hiv.text}}", + "translation_text": "anc_profile.step6.medications.options.prep_hiv.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "other", + "text": "{{anc_profile.step6.medications.options.other.text}}", + "translation_text": "anc_profile.step6.medications.options.other.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step6.medications.v_required.err}}" + } + }, + { + "key": "medications_other", + "openmrs_entity_parent": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step6.medications_other.hint}}", + "edit_type": "edit_text", + "v_required": { + "value": false, + "err": "{{anc_profile.step6.medications_other.v_required.err}}" + }, + "relevance": { + "step6:medications": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + } + ] + }, + "step7": { + "title": "{{anc_profile.step7.title}}", + "next": "step8", + "fields": [ + { + "key": "caffeine_intake", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165243AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_data_type": "select multiple", + "type": "check_box", + "label": "{{anc_profile.step7.caffeine_intake.label}}", + "label_text_style": "bold", + "hint": "{{anc_profile.step7.caffeine_intake.hint}}", + "label_info_text": "{{anc_profile.step7.caffeine_intake.label_info_text}}", + "exclusive": [ + "none" + ], + "options": [ + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165239AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "commercially_brewed_coffee", + "text": "{{anc_profile.step7.caffeine_intake.options.commercially_brewed_coffee.text}}", + "translation_text": "anc_profile.step7.caffeine_intake.options.commercially_brewed_coffee.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "key": "tea", + "text": "{{anc_profile.step7.caffeine_intake.options.tea.text}}", + "translation_text": "anc_profile.step7.caffeine_intake.options.tea.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "more_than_48_pieces_squares_of_chocolate", + "text": "{{anc_profile.step7.caffeine_intake.options.more_than_48_pieces_squares_of_chocolate.text}}", + "translation_text": "anc_profile.step7.caffeine_intake.options.more_than_48_pieces_squares_of_chocolate.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "key": "soda", + "text": "{{anc_profile.step7.caffeine_intake.options.soda.text}}", + "translation_text": "anc_profile.step7.caffeine_intake.options.soda.text" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "none", + "text": "{{anc_profile.step7.caffeine_intake.options.none.text}}", + "translation_text": "anc_profile.step7.caffeine_intake.options.none.text" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step7.caffeine_intake.v_required.err}}" + } + }, + { + "key": "caffeine_reduction_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step7.caffeine_reduction_toaster.text}}", + "translation_text": "anc_profile.step7.caffeine_reduction_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step7.caffeine_reduction_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step7.caffeine_reduction_toaster.toaster_info_title}}", + "toaster_type": "warning", + "relevance": { + "step7:caffeine_intake": { + "ex-checkbox": [ + { + "or": [ + "commercially_brewed_coffee", + "tea", + "soda", + "more_than_48_pieces_squares_of_chocolate" + ] + } + ] + } + } + }, + { + "key": "tobacco_user", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "163731AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step7.tobacco_user.label}}", + "label_text_style": "bold", + "multi_relevance": true, + "options": [ + { + "key": "yes", + "text": "{{anc_profile.step7.tobacco_user.options.yes.text}}", + "translation_text": "anc_profile.step7.tobacco_user.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "159450AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_profile.step7.tobacco_user.options.no.text}}", + "translation_text": "anc_profile.step7.tobacco_user.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "recently_quit", + "text": "{{anc_profile.step7.tobacco_user.options.recently_quit.text}}", + "translation_text": "anc_profile.step7.tobacco_user.options.recently_quit.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step7.tobacco_user.v_required.err}}" + } + }, + { + "key": "tobacco_cessation_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step7.tobacco_cessation_toaster.text}}", + "translation_text": "anc_profile.step7.tobacco_cessation_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step7.tobacco_cessation_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step7.tobacco_cessation_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "step7:tobacco_user": { + "ex-checkbox": [ + { + "or": [ + "yes", + "recently_quit" + ] + } + ] + } + } + }, + { + "key": "shs_exposure", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "152721AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step7.shs_exposure.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_profile.step7.shs_exposure.options.yes.text}}", + "translation_text": "anc_profile.step7.shs_exposure.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_profile.step7.shs_exposure.options.no.text}}", + "translation_text": "anc_profile.step7.shs_exposure.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step7.shs_exposure.v_required.err}}" + } + }, + { + "key": "second_hand_smoke_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step7.second_hand_smoke_toaster.text}}", + "translation_text": "anc_profile.step7.second_hand_smoke_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step7.second_hand_smoke_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step7.second_hand_smoke_toaster.toaster_info_title}}", + "toaster_type": "warning", + "relevance": { + "step7:shs_exposure": { + "type": "string", + "ex": "equalTo(., \"yes\")" + } + } + }, + { + "key": "condom_use", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1357AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step7.condom_use.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_profile.step7.condom_use.options.yes.text}}", + "translation_text": "anc_profile.step7.condom_use.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_profile.step7.condom_use.options.no.text}}", + "translation_text": "anc_profile.step7.condom_use.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step7.condom_use.v_required.err}}" + } + }, + { + "key": "condom_counseling_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step7.condom_counseling_toaster.text}}", + "translation_text": "anc_profile.step7.condom_counseling_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step7.condom_counseling_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step7.condom_counseling_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "step7:condom_use": { + "type": "string", + "ex": "equalTo(., \"no\")" + } + } + }, + { + "key": "alcohol_substance_enquiry", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165268AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step7.alcohol_substance_enquiry.label}}", + "label_text_style": "bold", + "label_info_text": "{{anc_profile.step7.alcohol_substance_enquiry.label_info_text}}", + "options": [ + { + "key": "yes", + "text": "{{anc_profile.step7.alcohol_substance_enquiry.options.yes.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_enquiry.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_profile.step7.alcohol_substance_enquiry.options.no.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_enquiry.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step7.alcohol_substance_enquiry.v_required.err}}" + } + }, + { + "key": "alcohol_substance_use", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "label": "{{anc_profile.step7.alcohol_substance_use.label}}", + "label_text_style": "bold", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_profile.step7.alcohol_substance_use.options.none.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_use.options.none.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "alcohol", + "text": "{{anc_profile.step7.alcohol_substance_use.options.alcohol.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_use.options.alcohol.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "143098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "marijuana", + "text": "{{anc_profile.step7.alcohol_substance_use.options.marijuana.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_use.options.marijuana.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165221AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "cocaine", + "text": "{{anc_profile.step7.alcohol_substance_use.options.cocaine.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_use.options.cocaine.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "155793AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "injectable_drugs", + "text": "{{anc_profile.step7.alcohol_substance_use.options.injectable_drugs.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_use.options.injectable_drugs.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "157351AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{anc_profile.step7.alcohol_substance_use.options.other.text}}", + "translation_text": "anc_profile.step7.alcohol_substance_use.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{anc_profile.step7.alcohol_substance_use.v_required.err}}" + } + }, + { + "key": "other_substance_use", + "openmrs_entity_parent": "165222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_profile.step7.other_substance_use.hint}}", + "edit_type": "edit_text", + "v_required": { + "value": false, + "err": "{{anc_profile.step7.other_substance_use.v_required.err}}" + }, + "relevance": { + "step7:alcohol_substance_use": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "substance_use_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step7.substance_use_toaster.text}}", + "translation_text": "anc_profile.step7.substance_use_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step7.substance_use_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step7.substance_use_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "step7:alcohol_substance_use": { + "ex-checkbox": [ + { + "or": [ + "alcohol", + "marijuana", + "cocaine", + "injectable_drugs", + "other" + ] + } + ] + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165257AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "hiv_risk", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "hiv_counselling_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step7.hiv_counselling_toaster.text}}", + "translation_text": "anc_profile.step7.hiv_counselling_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step7.hiv_counselling_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step7.hiv_counselling_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_relevance_rules.yml" + } + } + } + } + ] + }, + "step8": { + "title": "{{anc_profile.step8.title}}", + "fields": [ + { + "key": "partner_hiv_status", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1436AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_profile.step8.partner_hiv_status.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "dont_know", + "text": "{{anc_profile.step8.partner_hiv_status.options.dont_know.text}}", + "translation_text": "anc_profile.step8.partner_hiv_status.options.dont_know.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "positive", + "text": "{{anc_profile.step8.partner_hiv_status.options.positive.text}}", + "translation_text": "anc_profile.step8.partner_hiv_status.options.positive.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "negative", + "text": "{{anc_profile.step8.partner_hiv_status.options.negative.text}}", + "translation_text": "anc_profile.step8.partner_hiv_status.options.negative.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": false, + "err": "{{anc_profile.step8.partner_hiv_status.v_required.err}}" + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "partner_hiv_positive", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "bring_partners_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step8.bring_partners_toaster.text}}", + "translation_text": "anc_profile.step8.bring_partners_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step8.bring_partners_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step8.bring_partners_toaster.toaster_info_title}}", + "toaster_type": "info", + "relevance": { + "step8:partner_hiv_status": { + "type": "string", + "ex": "equalTo(., \"dont_know\")" + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165257AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "hiv_risk", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "profile_calculation_rules.yml" + } + } + } + }, + { + "key": "hiv_risk_counselling_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_profile.step8.hiv_risk_counselling_toaster.text}}", + "translation_text": "anc_profile.step8.hiv_risk_counselling_toaster.text", + "text_color": "#000000", + "toaster_info_text": "{{anc_profile.step8.hiv_risk_counselling_toaster.toaster_info_text}}", + "toaster_info_title": "{{anc_profile.step8.hiv_risk_counselling_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "step8:partner_hiv_status": { + "type": "string", + "ex": "equalTo(., \"positive\")" + } + } + } + ] + }, + "properties_file_name": "anc_profile" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/anc_quick_check.json b/opensrp-anc/src/main/assets/json.form/anc_quick_check.json index 89979cf4b..ea4cc3066 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_quick_check.json +++ b/opensrp-anc/src/main/assets/json.form/anc_quick_check.json @@ -1,637 +1,650 @@ { - "validate_on_submit": true, - "display_scroll_bars": true, - "count": "1", - "encounter_type": "Quick Check", - "entity_id": "", - "relational_id": "", - "form_version": "0.0.6", - "metadata": { - "start": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "start", - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "end": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "end", - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "today": { - "openmrs_entity_parent": "", - "openmrs_entity": "encounter", - "openmrs_entity_id": "encounter_date" - }, - "deviceid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "deviceid", - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "subscriberid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "subscriberid", - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "simserial": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "simserial", - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "phonenumber": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "phonenumber", - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "encounter_location": "", - "look_up": { - "entity_id": "", - "value": "" - } - }, - "step1": { - "title": "{{anc_quick_check.step1.title}}", - "fields": [ - { - "key": "contact_reason", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160288AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_quick_check.step1.contact_reason.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "first_contact", - "text": "{{anc_quick_check.step1.contact_reason.options.first_contact.text}}", - "translation_text": "anc_quick_check.step1.contact_reason.options.first_contact.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165269AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "scheduled_contact", - "text": "{{anc_quick_check.step1.contact_reason.options.scheduled_contact.text}}", - "translation_text": "anc_quick_check.step1.contact_reason.options.scheduled_contact.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1246AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "specific_complaint", - "text": "{{anc_quick_check.step1.contact_reason.options.specific_complaint.text}}", - "translation_text": "anc_quick_check.step1.contact_reason.options.specific_complaint.text", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_quick_check.step1.contact_reason.v_required.err}}" - } - }, - { - "key": "specific_complaint", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_quick_check.step1.specific_complaint.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "abnormal_discharge", - "text": "{{anc_quick_check.step1.specific_complaint.options.abnormal_discharge.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "123395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "changes_in_bp", - "text": "{{anc_quick_check.step1.specific_complaint.options.changes_in_bp.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "changes_in_bp_down", - "text": "{{anc_quick_check.step1.specific_complaint.options.changes_in_bp_down.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "constipation", - "text": "{{anc_quick_check.step1.specific_complaint.options.constipation.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "996AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "contractions", - "text": "{{anc_quick_check.step1.specific_complaint.options.contractions.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "cough", - "text": "{{anc_quick_check.step1.specific_complaint.options.cough.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "143264AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "diarrhea", - "text": "{{anc_quick_check.step1.specific_complaint.options.diarrhea.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "dizziness", - "text": "{{anc_quick_check.step1.specific_complaint.options.dizziness.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "156046AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no_fetal_movement", - "text": "{{anc_quick_check.step1.specific_complaint.options.no_fetal_movement.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1452AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "reduced_fetal_movement", - "text": "{{anc_quick_check.step1.specific_complaint.options.reduced_fetal_movement.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "113377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "fever", - "text": "{{anc_quick_check.step1.specific_complaint.options.fever.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "140238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "flu_symptoms", - "text": "{{anc_quick_check.step1.specific_complaint.options.flu_symptoms.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "137162AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "fluid_loss", - "text": "{{anc_quick_check.step1.specific_complaint.options.fluid_loss.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "148968AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "headache", - "text": "{{anc_quick_check.step1.specific_complaint.options.headache.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "heartburn", - "text": "{{anc_quick_check.step1.specific_complaint.options.heartburn.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "139059AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "trauma", - "text": "{{anc_quick_check.step1.specific_complaint.options.trauma.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "124193AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "domestic_violence", - "text": "{{anc_quick_check.step1.specific_complaint.options.domestic_violence.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "141814AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "altered_skin_color", - "text": "{{anc_quick_check.step1.specific_complaint.options.altered_skin_color.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "136443AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "leg_cramps", - "text": "{{anc_quick_check.step1.specific_complaint.options.leg_cramps.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "135969AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "leg_redness", - "text": "{{anc_quick_check.step1.specific_complaint.options.leg_redness.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "anxiety", - "text": "{{anc_quick_check.step1.specific_complaint.options.anxiety.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "121543AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "depression", - "text": "{{anc_quick_check.step1.specific_complaint.options.depression.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "119537AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other_psychological_symptoms", - "text": "{{anc_quick_check.step1.specific_complaint.options.other_psychological_symptoms.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160198AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "nausea_vomiting_diarrhea", - "text": "{{anc_quick_check.step1.specific_complaint.options.nausea_vomiting_diarrhea.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "157892AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "oedema", - "text": "{{anc_quick_check.step1.specific_complaint.options.oedema.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other_bleeding", - "text": "{{anc_quick_check.step1.specific_complaint.options.other_bleeding.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "147241AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other_skin_disorder", - "text": "{{anc_quick_check.step1.specific_complaint.options.other_skin_disorder.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "119022AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other_types_of_violence", - "text": "{{anc_quick_check.step1.specific_complaint.options.other_types_of_violence.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "158358AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "full_abdominal_pain", - "text": "{{anc_quick_check.step1.specific_complaint.options.full_abdominal_pain.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "139547AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "dysuria", - "text": "{{anc_quick_check.step1.specific_complaint.options.dysuria.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "118771AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "extreme_pelvic_pain", - "text": "{{anc_quick_check.step1.specific_complaint.options.extreme_pelvic_pain.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165270AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "leg_pain", - "text": "{{anc_quick_check.step1.specific_complaint.options.leg_pain.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "114395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "low_back_pain", - "text": "{{anc_quick_check.step1.specific_complaint.options.low_back_pain.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "116225AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other_pain", - "text": "{{anc_quick_check.step1.specific_complaint.options.other_pain.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "114403AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "pelvic_pain", - "text": "{{anc_quick_check.step1.specific_complaint.options.pelvic_pain.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "131034AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "pruritus", - "text": "{{anc_quick_check.step1.specific_complaint.options.pruritus.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "shortness_of_breath", - "text": "{{anc_quick_check.step1.specific_complaint.options.shortness_of_breath.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "141600AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "tiredness", - "text": "{{anc_quick_check.step1.specific_complaint.options.tiredness.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "124628AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "bleeding", - "text": "{{anc_quick_check.step1.specific_complaint.options.bleeding.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "147232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "visual_disturbance", - "text": "{{anc_quick_check.step1.specific_complaint.options.visual_disturbance.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "123074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "vomiting", - "text": "{{anc_quick_check.step1.specific_complaint.options.vomiting.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "" - }, - { - "key": "other_specify", - "text": "{{anc_quick_check.step1.specific_complaint.options.other_specify.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_quick_check.step1.specific_complaint.v_required.err}}" - }, - "relevance": { - "step1:contact_reason": { - "type": "string", - "ex": "equalTo(.,\"specific_complaint\")" - } - } - }, - { - "key": "specific_complaint_other", - "openmrs_entity_parent": "5219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "normal_edit_text", - "edit_text_style": "bordered", - "hint": "{{anc_quick_check.step1.specific_complaint_other.hint}}", - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_quick_check.step1.specific_complaint_other.v_regex.err}}" - }, - "relevance": { - "step1:specific_complaint": { - "ex-checkbox": [ - { - "or": [ - "other_specify" - ] - } - ] - } - } - }, - { - "key": "danger_signs", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160939AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_quick_check.step1.danger_signs.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "danger_none" - ], - "options": [ - { - "key": "danger_none", - "text": "{{anc_quick_check.step1.danger_signs.options.danger_none.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.danger_none.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "danger_bleeding", - "text": "{{anc_quick_check.step1.danger_signs.options.danger_bleeding.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.danger_bleeding.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "150802AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "central_cyanosis", - "text": "{{anc_quick_check.step1.danger_signs.options.central_cyanosis.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.central_cyanosis.text}", - "label_info_text": "Bluish discolouration around the mucous membranes in the mouth, lips and tongue", - "label_info_title": "Central cyanosis", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165216AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "convulsing", - "text": "{{anc_quick_check.step1.danger_signs.options.convulsing.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.convulsing.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "164483AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "danger_fever", - "text": "{{anc_quick_check.step1.danger_signs.options.danger_fever.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.danger_fever.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "140238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "severe_headache", - "text": "{{anc_quick_check.step1.danger_signs.options.severe_headache.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.severe_headache.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "139081AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "visual_disturbance", - "text": "{{anc_quick_check.step1.danger_signs.options.visual_disturbance.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.visual_disturbance.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "123074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "imminent_delivery", - "text": "{{anc_quick_check.step1.danger_signs.options.imminent_delivery.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.imminent_delivery.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "162818AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "labour", - "text": "{{anc_quick_check.step1.danger_signs.options.labour.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.labour.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "145AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "looks_very_ill", - "text": "{{anc_quick_check.step1.danger_signs.options.looks_very_ill.text}}", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163293AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "severe_vomiting", - "text": "{{anc_quick_check.step1.danger_signs.options.severe_vomiting.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.severe_vomiting.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "118477AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "severe_pain", - "text": "{{anc_quick_check.step1.danger_signs.options.severe_pain.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.severe_pain.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163477AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "severe_abdominal_pain", - "text": "{{anc_quick_check.step1.danger_signs.options.severe_abdominal_pain.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.severe_abdominal_pain.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165271AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "unconscious", - "text": "{{anc_quick_check.step1.danger_signs.options.unconscious.text}}", - "translation_text": "anc_quick_check.step1.danger_signs.options.unconscious.text", - "value": false, - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "123818AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_quick_check.step1.danger_signs.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "quick_check_relevance_rules.yml" - } - } - } - } - ] - }, - "properties_file_name": "anc_quick_check" + "validate_on_submit": true, + "display_scroll_bars": true, + "count": "1", + "encounter_type": "anc_quick_check", + "entity_id": "", + "relational_id": "", + "form_version": "0.0.6", + "metadata": { + "start": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "start", + "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "end": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "end", + "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "today": { + "openmrs_entity_parent": "", + "openmrs_entity": "encounter", + "openmrs_entity_id": "encounter_date" + }, + "deviceid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "deviceid", + "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "subscriberid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "subscriberid", + "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "simserial": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "simserial", + "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "phonenumber": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "phonenumber", + "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "encounter_location": "", + "look_up": { + "entity_id": "", + "value": "" + } + }, + "step1": { + "title": "{{anc_quick_check.step1.title}}", + "fields": [ + { + "key": "visit_date", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "visit_date", + "type": "date_picker", + "hint": "{{anc_quick_check.step1.visit_date.hint}}", + "expanded": false, + "min_date": "today-14m", + "max_date": "today", + "v_required": { + "value": "true", + "err": "{{anc_quick_check.step1.visit_date.v_required.err}}" + } + }, + + { + "key": "contact_reason", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "contact_reason", + "type": "native_radio", + "label": "{{anc_quick_check.step1.contact_reason.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "first_contact", + "text": "{{anc_quick_check.step1.contact_reason.options.first_contact.text}}", + "translation_text": "anc_quick_check.step1.contact_reason.options.first_contact.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "first_contact" + }, + { + "key": "scheduled_contact", + "text": "{{anc_quick_check.step1.contact_reason.options.scheduled_contact.text}}", + "translation_text": "anc_quick_check.step1.contact_reason.options.scheduled_contact.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1246AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "specific_complaint", + "text": "{{anc_quick_check.step1.contact_reason.options.specific_complaint.text}}", + "translation_text": "anc_quick_check.step1.contact_reason.options.specific_complaint.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "specific_complaint" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_quick_check.step1.contact_reason.v_required.err}}" + } + }, + { + "key": "specific_complaint", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "specific_complaint", + "type": "check_box", + "label": "{{anc_quick_check.step1.specific_complaint.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "abnormal_discharge", + "text": "{{anc_quick_check.step1.specific_complaint.options.abnormal_discharge.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "abnormal_discharge" + }, + { + "key": "changes_in_bp", + "text": "{{anc_quick_check.step1.specific_complaint.options.changes_in_bp.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "changes_in_bp" + }, + { + "key": "changes_in_bp_down", + "text": "{{anc_quick_check.step1.specific_complaint.options.changes_in_bp_down.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "changes_in_bp_down" + }, + { + "key": "constipation", + "text": "{{anc_quick_check.step1.specific_complaint.options.constipation.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "constipation" + }, + { + "key": "contractions", + "text": "{{anc_quick_check.step1.specific_complaint.options.contractions.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "contractions" + }, + { + "key": "cough", + "text": "{{anc_quick_check.step1.specific_complaint.options.cough.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "cough" + }, + { + "key": "diarrhea", + "text": "{{anc_quick_check.step1.specific_complaint.options.diarrhea.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "diarrhea" + }, + { + "key": "dizziness", + "text": "{{anc_quick_check.step1.specific_complaint.options.dizziness.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "dizziness" + }, + { + "key": "no_fetal_movement", + "text": "{{anc_quick_check.step1.specific_complaint.options.no_fetal_movement.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "no_fetal_movement" + }, + { + "key": "reduced_fetal_movement", + "text": "{{anc_quick_check.step1.specific_complaint.options.reduced_fetal_movement.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "reduced_fetal_movement" + }, + { + "key": "fever", + "text": "{{anc_quick_check.step1.specific_complaint.options.fever.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "fever" + }, + { + "key": "flu_symptoms", + "text": "{{anc_quick_check.step1.specific_complaint.options.flu_symptoms.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "flu_symptoms" + }, + { + "key": "fluid_loss", + "text": "{{anc_quick_check.step1.specific_complaint.options.fluid_loss.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "fluid_loss" + }, + { + "key": "headache", + "text": "{{anc_quick_check.step1.specific_complaint.options.headache.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "headache" + }, + { + "key": "heartburn", + "text": "{{anc_quick_check.step1.specific_complaint.options.heartburn.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "heartburn" + }, + { + "key": "trauma", + "text": "{{anc_quick_check.step1.specific_complaint.options.trauma.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "trauma" + }, + { + "key": "domestic_violence", + "text": "{{anc_quick_check.step1.specific_complaint.options.domestic_violence.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "domestic_violence" + }, + { + "key": "altered_skin_color", + "text": "{{anc_quick_check.step1.specific_complaint.options.altered_skin_color.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "altered_skin_color" + }, + { + "key": "leg_cramps", + "text": "{{anc_quick_check.step1.specific_complaint.options.leg_cramps.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "leg_cramps" + }, + { + "key": "leg_redness", + "text": "{{anc_quick_check.step1.specific_complaint.options.leg_redness.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "leg_redness" + }, + { + "key": "anxiety", + "text": "{{anc_quick_check.step1.specific_complaint.options.anxiety.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "anxiety" + }, + { + "key": "depression", + "text": "{{anc_quick_check.step1.specific_complaint.options.depression.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "depression" + }, + { + "key": "other_psychological_symptoms", + "text": "{{anc_quick_check.step1.specific_complaint.options.other_psychological_symptoms.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "other_psychological_symptoms" + }, + { + "key": "nausea_vomiting_diarrhea", + "text": "{{anc_quick_check.step1.specific_complaint.options.nausea_vomiting_diarrhea.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "nausea_vomiting_diarrhea" + }, + { + "key": "oedema", + "text": "{{anc_quick_check.step1.specific_complaint.options.oedema.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "oedema" + }, + { + "key": "other_bleeding", + "text": "{{anc_quick_check.step1.specific_complaint.options.other_bleeding.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "other_bleeding" + }, + { + "key": "other_skin_disorder", + "text": "{{anc_quick_check.step1.specific_complaint.options.other_skin_disorder.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "other_skin_disorder" + }, + { + "key": "other_types_of_violence", + "text": "{{anc_quick_check.step1.specific_complaint.options.other_types_of_violence.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "other_types_of_violence" + }, + { + "key": "full_abdominal_pain", + "text": "{{anc_quick_check.step1.specific_complaint.options.full_abdominal_pain.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "full_abdominal_pain" + }, + { + "key": "dysuria", + "text": "{{anc_quick_check.step1.specific_complaint.options.dysuria.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "dysuria" + }, + { + "key": "extreme_pelvic_pain", + "text": "{{anc_quick_check.step1.specific_complaint.options.extreme_pelvic_pain.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "extreme_pelvic_pain" + }, + { + "key": "leg_pain", + "text": "{{anc_quick_check.step1.specific_complaint.options.leg_pain.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "leg_pain" + }, + { + "key": "low_back_pain", + "text": "{{anc_quick_check.step1.specific_complaint.options.low_back_pain.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "low_back_pain" + }, + { + "key": "other_pain", + "text": "{{anc_quick_check.step1.specific_complaint.options.other_pain.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "other_pain" + }, + { + "key": "pelvic_pain", + "text": "{{anc_quick_check.step1.specific_complaint.options.pelvic_pain.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "pelvic_pain" + }, + { + "key": "pruritus", + "text": "{{anc_quick_check.step1.specific_complaint.options.pruritus.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "pruritus" + }, + { + "key": "shortness_of_breath", + "text": "{{anc_quick_check.step1.specific_complaint.options.shortness_of_breath.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "shortness_of_breath" + }, + { + "key": "tiredness", + "text": "{{anc_quick_check.step1.specific_complaint.options.tiredness.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "tiredness" + }, + { + "key": "bleeding", + "text": "{{anc_quick_check.step1.specific_complaint.options.bleeding.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "bleeding" + }, + { + "key": "visual_disturbance", + "text": "{{anc_quick_check.step1.specific_complaint.options.visual_disturbance.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "visual_disturbance" + }, + { + "key": "vomiting", + "text": "{{anc_quick_check.step1.specific_complaint.options.vomiting.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "vomiting" + }, + { + "key": "other_specify", + "text": "{{anc_quick_check.step1.specific_complaint.options.other_specify.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "other_specify" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_quick_check.step1.specific_complaint.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_quick_check_relevance.yml" + } + } + } + }, + { + "key": "specific_complaint_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "specific_complaint_other", + "type": "normal_edit_text", + "edit_text_style": "bordered", + "hint": "{{anc_quick_check.step1.specific_complaint_other.hint}}", + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_quick_check.step1.specific_complaint_other.v_regex.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_quick_check_relevance.yml" + } + } + } + }, + { + "key": "danger_signs", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "danger_signs", + "type": "check_box", + "label": "{{anc_quick_check.step1.danger_signs.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "danger_none" + ], + "options": [ + { + "key": "danger_none", + "text": "{{anc_quick_check.step1.danger_signs.options.danger_none.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.danger_none.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "danger_none" + }, + { + "key": "danger_bleeding", + "text": "{{anc_quick_check.step1.danger_signs.options.danger_bleeding.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.danger_bleeding.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "danger_bleeding" + }, + { + "key": "central_cyanosis", + "text": "{{anc_quick_check.step1.danger_signs.options.central_cyanosis.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.central_cyanosis.text}", + "label_info_title": "{{anc_quick_check.step1.danger_signs.options.central_cyanosis.label_info_title}}", + "label_info_text": "{{anc_quick_check.step1.danger_signs.options.central_cyanosis.label_info_text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "central_cyanosis" + }, + { + "key": "convulsing", + "text": "{{anc_quick_check.step1.danger_signs.options.convulsing.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.convulsing.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "convulsing" + }, + { + "key": "danger_fever", + "text": "{{anc_quick_check.step1.danger_signs.options.danger_fever.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.danger_fever.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "danger_fever" + }, + { + "key": "severe_headache", + "text": "{{anc_quick_check.step1.danger_signs.options.severe_headache.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.severe_headache.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "severe_headache" + }, + { + "key": "visual_disturbance", + "text": "{{anc_quick_check.step1.danger_signs.options.visual_disturbance.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.visual_disturbance.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "visual_disturbance" + }, + { + "key": "imminent_delivery", + "text": "{{anc_quick_check.step1.danger_signs.options.imminent_delivery.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.imminent_delivery.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "imminent_delivery" + }, + { + "key": "labour", + "text": "{{anc_quick_check.step1.danger_signs.options.labour.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.labour.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "labour" + }, + { + "key": "looks_very_ill", + "text": "{{anc_quick_check.step1.danger_signs.options.looks_very_ill.text}}", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "looks_very_ill" + }, + { + "key": "severe_vomiting", + "text": "{{anc_quick_check.step1.danger_signs.options.severe_vomiting.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.severe_vomiting.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "severe_vomiting" + }, + { + "key": "severe_pain", + "text": "{{anc_quick_check.step1.danger_signs.options.severe_pain.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.severe_pain.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "severe_pain" + }, + { + "key": "severe_abdominal_pain", + "text": "{{anc_quick_check.step1.danger_signs.options.severe_abdominal_pain.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.severe_abdominal_pain.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "severe_abdominal_pain" + }, + { + "key": "unconscious", + "text": "{{anc_quick_check.step1.danger_signs.options.unconscious.text}}", + "translation_text": "anc_quick_check.step1.danger_signs.options.unconscious.text", + "value": false, + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "unconscious" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_quick_check.step1.danger_signs.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_quick_check_relevance.yml" + } + } + } + } + ] + }, + "properties_file_name": "anc_quick_check" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/anc_register.json b/opensrp-anc/src/main/assets/json.form/anc_register.json index 01cfc779d..74352b69f 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_register.json +++ b/opensrp-anc/src/main/assets/json.form/anc_register.json @@ -1,556 +1,781 @@ { - "count": "1", - "encounter_type": "ANC Registration", - "entity_id": "", - "relational_id": "", - "metadata": { - "start": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "start", - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "end": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "end", - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "today": { - "openmrs_entity_parent": "", - "openmrs_entity": "encounter", - "openmrs_entity_id": "encounter_date" - }, - "deviceid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "deviceid", - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "subscriberid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "subscriberid", - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "simserial": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "simserial", - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "phonenumber": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "phonenumber", - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "encounter_location": "", - "look_up": { - "entity_id": "", - "value": "" - } - }, - "step1": { - "title": "{{anc_register.step1.title}}", - "fields": [ - { - "key": "wom_image", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "choose_image", - "uploadButtonText": "Take a picture of the woman" - }, - { - "key": "anc_id", - "openmrs_entity_parent": "", - "openmrs_entity": "person_identifier", - "openmrs_entity_id": "ANC_ID", - "type": "barcode", - "barcode_type": "qrcode", - "hint": "{{anc_register.step1.anc_id.hint}}", - "value": "0", - "scanButtonText": "Scan QR Code", - "v_numeric": { - "value": "true", - "err": "{{anc_register.step1.anc_id.v_numeric.err}}" - }, - "v_required": { - "value": "true", - "err": "{{anc_register.step1.anc_id.v_required.err}}" - } - }, - { - "key": "first_name", - "openmrs_entity_parent": "", - "openmrs_entity": "person", - "openmrs_entity_id": "first_name", - "type": "edit_text", - "hint": "{{anc_register.step1.first_name.hint}}", - "edit_type": "name", - "v_required": { - "value": "true", - "err": "{{anc_register.step1.first_name.v_required.err}}" - }, - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_register.step1.first_name.v_regex.err}}" - } - }, - { - "key": "last_name", - "openmrs_entity_parent": "", - "openmrs_entity": "person", - "openmrs_entity_id": "last_name", - "type": "edit_text", - "hint": "{{anc_register.step1.last_name.hint}}", - "edit_type": "name", - "v_required": { - "value": "true", - "err": "{{anc_register.step1.last_name.v_required.err}}" - }, - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_register.step1.last_name.v_regex.err}}" - } - }, - { - "key": "gender", - "openmrs_entity_parent": "", - "openmrs_entity": "person", - "openmrs_entity_id": "gender", - "type": "hidden", - "value": "F" - }, - { - "key": "dob", - "openmrs_entity_parent": "", - "openmrs_entity": "person", - "openmrs_entity_id": "birthdate", - "type": "hidden", - "value": "", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "registration_calculation_rules.yml" - } - } - } - }, - { - "key": "dob_calculated", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "value": "", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "registration_calculation_rules.yml" - } - } - } - }, - { - "key": "dob_entered", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "date_picker", - "hint": "{{anc_register.step1.dob_entered.hint}}", - "expanded": false, - "duration": { - "label": "{{anc_register.step1.dob_entered.duration.label}}" - }, - "min_date": "today-49y", - "max_date": "today-10y", - "v_required": { - "value": "true", - "err": "{{anc_register.step1.dob_entered.v_required.err}}" - }, - "relevance": { - "step1:dob_unknown": { - "ex-checkbox": [ - { - "not": [ - "dob_unknown" - ] - } - ] - } - } - }, - { - "key": "dob_unknown", - "openmrs_entity_parent": "", - "openmrs_entity": "person", - "openmrs_entity_id": "birthdate_estimated", - "type": "check_box", - "options": [ - { - "key": "dob_unknown", - "text": "{{anc_register.step1.dob_unknown.options.dob_unknown.text}}", - "text_size": "18px", - "value": "false", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - } - ] - }, - { - "key": "age", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "age", - "type": "hidden", - "value": "", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "registration_calculation_rules.yml" - } - } - } - }, - { - "key": "age_calculated", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "value": "", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "registration_calculation_rules.yml" - } - } - } - }, - { - "key": "age_entered", - "openmrs_entity_parent": "", - "openmrs_entity": "person", - "openmrs_entity_id": "age", - "type": "edit_text", - "hint": "{{anc_register.step1.age_entered.hint}}", - "v_numeric": { - "value": "true", - "err": "{{anc_register.step1.age_entered.v_numeric.err}}" - }, - "v_min": { - "value": "10", - "err": "Age must be equal to or greater than 10" - }, - "v_max": { - "value": "49", - "err": "Age must be equal or less than 49" - }, - "relevance": { - "step1:dob_unknown": { - "ex-checkbox": [ - { - "and": [ - "dob_unknown" - ] - } - ] - } - }, - "v_required": { - "value": "true", - "err": "{{anc_register.step1.age_entered.v_required.err}}" - } - }, - { - "key": "home_address", - "openmrs_entity_parent": "", - "openmrs_entity": "person_address", - "openmrs_entity_id": "address2", - "type": "edit_text", - "hint": "{{anc_register.step1.home_address.hint}}", - "edit_type": "name", - "v_required": { - "value": "true", - "err": "{{anc_register.step1.home_address.v_required.err}}" - } - }, - { - "key": "phone_number", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "phone_number", - "type": "edit_text", - "hint": "{{anc_register.step1.phone_number.hint}}", - "v_numeric": { - "value": "true", - "err": "{{anc_register.step1.phone_number.v_numeric.err}}" - }, - "v_required": { - "value": "true", - "err": "{{anc_register.step1.phone_number.v_required.err}}" - }, - "v_max_length": { - "value": "12", - "err": "Phone number input cannot exceed 12 Characters" - } - }, - { - "key": "reminders", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "reminders", - "type": "native_radio", - "label": "{{anc_register.step1.reminders.label}}", - "label_info_text": "{{anc_register.step1.reminders.label_info_text}}", - "label_text_style": "normal", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_register.step1.reminders.options.yes.text}}", - "openmrs_entity": "", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_register.step1.reminders.options.no.text}}", - "openmrs_entity": "", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{anc_register.step1.reminders.v_required.err}}" - } - }, - { - "key": "alt_name", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "alt_name", - "type": "edit_text", - "hint": "{{anc_register.step1.alt_name.hint}}", - "edit_type": "name", - "look_up": "true", - "entity_id": "", - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_register.step1.alt_name.v_regex.err}}" - } - }, - { - "key": "alt_phone_number", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "alt_phone_number", - "type": "edit_text", - "hint": "{{anc_register.step1.alt_phone_number.hint}}", - "v_numeric": { - "value": "true", - "err": "{{anc_register.step1.alt_phone_number.v_numeric.err}}" - } - }, - { - "key": "cohabitants", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "cohabitants", - "label": "{{anc_register.step1.cohabitants.label}}", - "label_info_text": "{{anc_register.step1.cohabitants.label_info_text}}", - "type": "check_box", - "exclusive": [ - "no_one" - ], - "options": [ - { - "key": "parents", - "text": "{{anc_register.step1.cohabitants.options.parents.text}}", - "text_size": "18px", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - }, - { - "key": "siblings", - "text": "{{anc_register.step1.cohabitants.options.siblings.text}}", - "text_size": "18px", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - }, - { - "key": "extended_family", - "text": "{{anc_register.step1.cohabitants.options.extended_family.text}}", - "text_size": "18px", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - }, - { - "key": "partner", - "text": "{{anc_register.step1.cohabitants.options.partner.text}}", - "text_size": "18px", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - }, - { - "key": "friends", - "text": "{{anc_register.step1.cohabitants.options.friends.text}}", - "text_size": "18px", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - }, - { - "key": "no_one", - "text": "{{anc_register.step1.cohabitants.options.no_one.text}}", - "text_size": "18px", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "" - } - ] - }, - { - "key": "next_contact", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "next_contact", - "type": "hidden", - "value": "" - }, - { - "key": "edd", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "edd", - "type": "hidden", - "value": "" - }, - { - "key": "next_contact_date", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "next_contact_date", - "type": "hidden", - "value": "" - }, - { - "key": "contact_status", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "contact_status", - "type": "hidden", - "value": "" - }, - { - "key": "previous_contact_status", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "contact_status", - "type": "hidden", - "value": "" - }, - { - "key": "red_flag_count", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "red_flag_count", - "type": "hidden", - "value": "" - }, - { - "key": "yellow_flag_count", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "yellow_flag_count", - "type": "hidden", - "value": "" - }, - { - "key": "last_contact_record_date", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "last_contact_record_date", - "type": "hidden", - "value": "" - }, - { - "key": "province", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "province", - "type": "spinner", - "sub_type": "location", - "hint": "Select Province", - "options" : [], - "v_required": { - "value": "true", - "err": "Please Select" - } - }, - { - "key": "district", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "district", - "type": "spinner", - "sub_type": "location", - "hint": "Select District", - "options" : [], - "v_required": { - "value": "true", - "err": "Please Select" - } - }, - { - "key": "subdistrict", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "subdistrict", - "type": "spinner", - "sub_type": "location", - "hint": "Select Sub-District", - "options" : [], - "v_required": { - "value": "true", - "err": "Please Select" - } - }, - { - "key": "health_facility", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "health_facility", - "type": "spinner", - "sub_type": "location", - "hint": "Select Health Facility", - "options" : [], - "v_required": { - "value": "true", - "err": "Please Select" - } - }, - { - "key": "village", - "openmrs_entity_parent": "", - "openmrs_entity": "person_attribute", - "openmrs_entity_id": "village", - "type": "spinner", - "sub_type": "location", - "hint": "Select Village", - "options" : [], - "v_required": { - "value": "true", - "err": "Please Select" - } - } - ] - }, - "properties_file_name": "anc_register" + "count": "1", + "encounter_type": "ANC Registration", + "entity_id": "", + "relational_id": "", + "metadata": { + "start": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "start", + "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "end": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "end", + "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "today": { + "openmrs_entity_parent": "", + "openmrs_entity": "encounter", + "openmrs_entity_id": "encounter_date" + }, + "deviceid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "deviceid", + "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "subscriberid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "subscriberid", + "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "simserial": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "simserial", + "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "phonenumber": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "phonenumber", + "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "encounter_location": "", + "look_up": { + "entity_id": "", + "value": "" + } + }, + "properties_file_name": "anc_register", + "step1": { + "title": "{{anc_register.step1.title}}", + "fields": [ + + { + "key": "spacer_id", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "20sp" + }, + + { + "key": "wom_image", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "wom_image", + "type": "choose_image", + "uploadButtonText": "{{anc_register.step1.wom_image.button_label}}" + }, + { + "key": "anc_id", + "openmrs_entity_parent": "", + "openmrs_entity": "person_identifier", + "openmrs_entity_id": "ANC_ID", + "type": "barcode", + "barcode_type": "qrcode", + "hint": "{{anc_register.step1.anc_id.hint}}", + "value": "0", + "scanButtonText": "{{anc_register.step1.anc_id.qrcode_button_label}}", + "v_numeric": { + "value": "true", + "err": "{{anc_register.step1.anc_id.v_numeric.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_register.step1.anc_id.v_required.err}}" + } + }, + + { + "key": "spacer_identity", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "30sp" + }, + { + "key": "group_identity", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_register.step1.group_identity.text}}", + "text_color": "#228CC6", + "text_size": "16px" + }, + { + "key": "uid", + "openmrs_entity_parent": "", + "openmrs_entity": "person_identifier", + "openmrs_entity_id": "uid", + "type": "edit_text", + "hint": "{{anc_register.step1.uid.hint}}", + "v_numeric": { + "value": "true", + "err": "{{anc_register.step1.uid.v_numeric.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_register.step1.uid.v_required.err}}" + }, + "v_regex": { + "value": "[0-9]{16}", + "err": "{{anc_register.step1.uid.v_length.err}}" + }, + "v_max_length": { + "value": "16", + "err": "{{anc_register.step1.uid.v_length.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_relevance.yml" + } + } + } + }, + { + "key": "uid_unknown", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "uid_unknown", + "type": "check_box", + "options": [ + { + "key": "yes", + "text": "{{anc_register.step1.uid_unknown.options.yes.text}}", + "text_size": "18px", + "value": "false" + } + ] + }, + { + "key": "uid_unknown_reason", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "uid_unknown_reason", + "label": "{{anc_register.step1.uid_unknown_reason.label}}", + "label_text_style": "bold", + "label_info_text": "{{anc_register.step1.uid_unknown_reason.label_info_text}}", + "type": "native_radio", + "options": [ + { + "key": "dont_have", + "text": "{{anc_register.step1.uid_unknown_reason.options.dont_have.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "dont_bring", + "text": "{{anc_register.step1.uid_unknown_reason.options.dont_bring.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "lost", + "text": "{{anc_register.step1.uid_unknown_reason.options.lost.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "privacy", + "text": "{{anc_register.step1.uid_unknown_reason.options.privacy.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_register.step1.uid_unknown_reason.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_relevance.yml" + } + } + } + }, + { + "key": "ssn", + "openmrs_entity_parent": "", + "openmrs_entity": "person_identifier", + "openmrs_entity_id": "ssn", + "type": "edit_text", + "hint": "{{anc_register.step1.ssn.hint}}", + "v_numeric": { + "value": "true", + "err": "{{anc_register.step1.ssn.v_numeric.err}}" + }, + "v_regex": { + "value": "^$|[0-9]{11,13}", + "err": "{{anc_register.step1.ssn.v_length.err}}" + }, + "v_max_length": { + "value": "13", + "err": "{{anc_register.step1.ssn.v_length.err}}" + } + }, + { + "key": "ssn_status", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "ssn_status", + "label": "{{anc_register.step1.ssn_status.label}}", + "label_text_style": "bold", + "label_info_text": "{{anc_register.step1.ssn_status.label_info_text}}", + "type": "native_radio", + "options": [ + { + "key": "active", + "text": "{{anc_register.step1.ssn_status.options.active.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "inactive", + "text": "{{anc_register.step1.ssn_status.options.inactive.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "dont_have", + "text": "{{anc_register.step1.ssn_status.options.dont_have.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_register.step1.ssn_status.v_required.err}}" + } + }, + { + "key": "first_name", + "openmrs_entity_parent": "", + "openmrs_entity": "person", + "openmrs_entity_id": "first_name", + "type": "edit_text", + "hint": "{{anc_register.step1.first_name.hint}}", + "edit_type": "name", + "v_required": { + "value": "true", + "err": "{{anc_register.step1.first_name.v_required.err}}" + }, + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_register.step1.first_name.v_regex.err}}" + } + }, + { + "key": "last_name", + "openmrs_entity_parent": "", + "openmrs_entity": "person", + "openmrs_entity_id": "last_name", + "type": "edit_text", + "hint": "{{anc_register.step1.last_name.hint}}", + "edit_type": "name", + "v_required": { + "value": "true", + "err": "{{anc_register.step1.last_name.v_required.err}}" + }, + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_register.step1.last_name.v_regex.err}}" + } + }, + + { + "key": "spacer_age_dob", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "30sp" + }, + { + "key": "group_age_dob", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_register.step1.group_age_dob.text}}", + "text_color": "#228CC6", + "text_size": "16px" + }, + { + "key": "dob", + "openmrs_entity_parent": "", + "openmrs_entity": "person", + "openmrs_entity_id": "birthdate", + "type": "hidden", + "value": "", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_calculation.yml" + } + } + } + }, + { + "key": "dob_entered", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "date_picker", + "hint": "{{anc_register.step1.dob_entered.hint}}", + "expanded": false, + "duration": { + "label": "{{anc_register.step1.dob_entered.duration.label}}" + }, + "min_date": "today-49y", + "max_date": "today-10y", + "v_required": { + "value": "true", + "err": "{{anc_register.step1.dob_entered.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_relevance.yml" + } + } + } + }, + { + "key": "dob_unknown", + "openmrs_entity_parent": "", + "openmrs_entity": "person", + "openmrs_entity_id": "birthdate_estimated", + "type": "check_box", + "options": [ + { + "key": "yes", + "text": "{{anc_register.step1.dob_unknown.options.yes.text}}", + "text_size": "18px", + "value": "false" + } + ] + }, + { + "key": "age_entered", + "openmrs_entity_parent": "", + "openmrs_entity": "person", + "openmrs_entity_id": "age", + "type": "edit_text", + "hint": "{{anc_register.step1.age_entered.hint}}", + "v_numeric": { + "value": "true", + "err": "{{anc_register.step1.age_entered.v_numeric.err}}" + }, + "v_min": { + "value": "10", + "err": "{{anc_register.step1.age_entered.v_min.err}}" + }, + "v_max": { + "value": "49", + "err": "{{anc_register.step1.age_entered.v_max.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_relevance.yml" + } + } + }, + "v_required": { + "value": "true", + "err": "{{anc_register.step1.age_entered.v_required.err}}" + } + }, + + { + "key": "spacer_contact", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "30sp" + }, + { + "key": "group_contact", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_register.step1.group_contact.text}}", + "text_color": "#228CC6", + "text_size": "16px" + }, + { + "key": "home_address", + "openmrs_entity_parent": "", + "openmrs_entity": "person_address", + "openmrs_entity_id": "address2", + "type": "edit_text", + "hint": "{{anc_register.step1.home_address.hint}}", + "edit_type": "name", + "v_required": { + "value": "true", + "err": "{{anc_register.step1.home_address.v_required.err}}" + } + }, + { + "key": "phone_number", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "phone_number", + "type": "edit_text", + "hint": "{{anc_register.step1.phone_number.hint}}", + "v_numeric": { + "value": "true", + "err": "{{anc_register.step1.phone_number.v_numeric.err}}" + }, + "v_required": { + "value": "true", + "err": "{{anc_register.step1.phone_number.v_required.err}}" + }, + "v_max_length": { + "value": "12", + "err": "{{anc_register.step1.phone_number.v_max_length.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_relevance.yml" + } + } + } + }, + { + "key": "phone_number_unknown", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "phone_number_unknown", + "type": "check_box", + "options": [ + { + "key": "yes", + "text": "{{anc_register.step1.phone_number_unknown.options.yes.text}}", + "text_size": "18px", + "value": "false" + } + ] + }, + { + "key": "phone_number_unknown_reason", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "phone_number_unknown_reason", + "label": "{{anc_register.step1.phone_number_unknown_reason.label}}", + "label_text_style": "bold", + "label_info_text": "{{anc_register.step1.phone_number_unknown_reason.label_info_text}}", + "type": "native_radio", + "options": [ + { + "key": "dont_have", + "text": "{{anc_register.step1.phone_number_unknown_reason.options.dont_have.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "lost", + "text": "{{anc_register.step1.phone_number_unknown_reason.options.lost.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "privacy", + "text": "{{anc_register.step1.phone_number_unknown_reason.options.privacy.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_register.step1.phone_number_unknown_reason.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_relevance.yml" + } + } + } + }, + { + "key": "alt_name", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "alt_name", + "type": "edit_text", + "hint": "{{anc_register.step1.alt_name.hint}}", + "edit_type": "name", + "look_up": "true", + "entity_id": "", + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_register.step1.alt_name.v_regex.err}}" + } + }, + { + "key": "alt_phone_number", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "alt_phone_number", + "type": "edit_text", + "hint": "{{anc_register.step1.alt_phone_number.hint}}", + "v_numeric": { + "value": "true", + "err": "{{anc_register.step1.alt_phone_number.v_numeric.err}}" + }, + "v_max_length": { + "value": "12", + "err": "{{anc_register.step1.alt_phone_number.v_max_length.err}}" + } + }, + { + "key": "spacer_cohabitants", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "20sp" + }, + { + "key": "cohabitants", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "cohabitants", + "label": "{{anc_register.step1.cohabitants.label}}", + "label_info_text": "{{anc_register.step1.cohabitants.label_info_text}}", + "label_text_style": "bold", + "type": "check_box", + "exclusive": [ + "no_one" + ], + "options": [ + { + "key": "parents", + "text": "{{anc_register.step1.cohabitants.options.parents.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "siblings", + "text": "{{anc_register.step1.cohabitants.options.siblings.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "extended_family", + "text": "{{anc_register.step1.cohabitants.options.extended_family.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "partner", + "text": "{{anc_register.step1.cohabitants.options.partner.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "friends", + "text": "{{anc_register.step1.cohabitants.options.friends.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "no_one", + "text": "{{anc_register.step1.cohabitants.options.no_one.text}}", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "" + } + ] + }, + + { + "key": "spacer_additional", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "30sp" + }, + { + "key": "group_additional", + "type": "label", + "label_text_style": "bold", + "text": "{{anc_register.step1.group_additional.text}}", + "text_color": "#228CC6", + "text_size": "16px" + }, + { + "key": "reminders", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "reminders", + "type": "native_radio", + "label": "{{anc_register.step1.reminders.label}}", + "label_info_text": "{{anc_register.step1.reminders.label_info_text}}", + "label_text_style": "bold", + "options": [ + { + "key": "yes", + "text": "{{anc_register.step1.reminders.options.yes.text}}", + "openmrs_entity": "", + "openmrs_entity_id": "" + }, + { + "key": "no", + "text": "{{anc_register.step1.reminders.options.no.text}}", + "openmrs_entity": "", + "openmrs_entity_id": "" + } + ], + "v_required": { + "value": true, + "err": "{{anc_register.step1.reminders.v_required.err}}" + } + }, + + { + "key": "gender", + "openmrs_entity_parent": "", + "openmrs_entity": "person", + "openmrs_entity_id": "gender", + "type": "hidden", + "value": "F" + }, + { + "key": "age", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "age", + "type": "hidden", + "value": "", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_calculation.yml" + } + } + } + }, + { + "key": "age_calculated", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "value": "", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_calculation.yml" + } + } + } + }, + { + "key": "dob_calculated", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "value": "", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "anc_register_calculation.yml" + } + } + } + }, + { + "key": "edd", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "edd", + "type": "hidden", + "value": "" + }, + { + "key": "next_contact", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "next_contact", + "type": "hidden", + "value": "" + }, + { + "key": "next_contact_date", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "next_contact_date", + "type": "hidden", + "value": "" + }, + { + "key": "contact_status", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "contact_status", + "type": "hidden", + "value": "" + }, + { + "key": "previous_contact_status", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "contact_status", + "type": "hidden", + "value": "" + }, + { + "key": "last_contact_record_date", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "last_contact_record_date", + "type": "hidden", + "value": "" + }, + { + "key": "red_flag_count", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "red_flag_count", + "type": "hidden", + "value": "" + }, + { + "key": "yellow_flag_count", + "openmrs_entity_parent": "", + "openmrs_entity": "person_attribute", + "openmrs_entity_id": "yellow_flag_count", + "type": "hidden", + "value": "" + } + + ] + } } diff --git a/opensrp-anc/src/main/assets/json.form/anc_site_characteristics.json b/opensrp-anc/src/main/assets/json.form/anc_site_characteristics.json index 0ed89bc63..9f66332d7 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_site_characteristics.json +++ b/opensrp-anc/src/main/assets/json.form/anc_site_characteristics.json @@ -1,120 +1,184 @@ { - "count": "1", - "display_scroll_bars": true, - "encounter_type": "Site Characteristics", - "entity_id": "", - "relational_id": "", - "metadata": { - "start": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "start", - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "end": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "end", - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "today": { - "openmrs_entity_parent": "", - "openmrs_entity": "encounter", - "openmrs_entity_id": "encounter_date" - }, - "deviceid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "deviceid", - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "subscriberid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "subscriberid", - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "simserial": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "simserial", - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "phonenumber": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "phonenumber", - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "encounter_location": "", - "look_up": { - "entity_id": "", - "value": "" - } - }, - "step1": { - "title": "{{anc_site_characteristics.step1.title}}", - "fields": [ - { - "key": "label_site_ipv_assess", - "type": "label", - "text": "{{anc_site_characteristics.step1.label_site_ipv_assess.text}}", - "text_size": "22px", - "text_color": "black", - "v_required": { - "value": true, - "err": "{{anc_site_characteristics.step1.label_site_ipv_assess.v_required.err}}" - } - }, - { - "key": "site_ipv_assess", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "openmrs_data_type": "select one", - "label": "{{anc_site_characteristics.step1.site_ipv_assess.label}}", - "type": "native_radio", - "options": [ - { - "key": "1", - "text": "{{anc_site_characteristics.step1.site_ipv_assess.options.1.text}}" - }, - { - "key": "0", - "text": "{{anc_site_characteristics.step1.site_ipv_assess.options.0.text}}" - } - ], - "value": "", - "v_required": { - "value": "false", - "err": "{{anc_site_characteristics.step1.site_ipv_assess.v_required.err}}" - } - }, - { - "key": "site_ultrasound", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "openmrs_data_type": "select one", - "type": "native_radio", - "label": "{{anc_site_characteristics.step1.site_ultrasound.label}}", - "options": [ - { - "key": "1", - "text": "{{anc_site_characteristics.step1.site_ultrasound.options.1.text}}" - }, - { - "key": "0", - "text": "{{anc_site_characteristics.step1.site_ultrasound.options.0.text}}" - } - ], - "value": "", - "v_required": { - "value": "true", - "err": "{{anc_site_characteristics.step1.site_ultrasound.v_required.err}}" - } - } - ] - }, - "properties_file_name": "anc_site_characteristics" + "count": "1", + "display_scroll_bars": true, + "encounter_type": "Site Characteristics", + "entity_id": "", + "relational_id": "", + "metadata": { + "start": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "start", + "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "end": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "end", + "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "today": { + "openmrs_entity_parent": "", + "openmrs_entity": "encounter", + "openmrs_entity_id": "encounter_date" + }, + "deviceid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "deviceid", + "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "subscriberid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "subscriberid", + "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "simserial": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "simserial", + "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "phonenumber": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "phonenumber", + "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "encounter_location": "", + "look_up": { + "entity_id": "", + "value": "" + } + }, + "step1": { + "title": "{{anc_site_characteristics.step1.title}}", + "fields": [ + { + "key": "label_site_ipv_assess", + "type": "label", + "text": "{{anc_site_characteristics.step1.label_site_ipv_assess.text}}", + "translation_text": "anc_site_characteristics.step1.label_site_ipv_assess.text", + "text_color": "black", + "label_text_style": "bold", + "v_required": { + "value": true, + "err": "{{anc_site_characteristics.step1.label_site_ipv_assess.v_required.err}}" + } + }, + { + "key": "site_ipv_assess", + "title": "Kebutuhan minimum penilaian IPV", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "openmrs_data_type": "", + "label": "{{anc_site_characteristics.step1.site_ipv_assess.label}}", + "type": "native_radio", + "options": [ + { + "key": "1", + "text": "{{anc_site_characteristics.step1.site_ipv_assess.options.1.text}}", + "translation_text": "anc_site_characteristics.step1.site_ipv_assess.options.1.text" + }, + { + "key": "0", + "text": "{{anc_site_characteristics.step1.site_ipv_assess.options.0.text}}", + "translation_text": "anc_site_characteristics.step1.site_ipv_assess.options.0.text" + } + ], + "value": "", + "v_required": { + "value": "false", + "err": "{{anc_site_characteristics.step1.site_ipv_assess.v_required.err}}" + } + }, + { + "key": "site_anc_hiv", + "title": "Epidemi HIV umum", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "openmrs_data_type": "", + "label": "{{anc_site_characteristics.step1.site_anc_hiv.label}}", + "type": "native_radio", + "label_text_style": "bold", + "options": [ + { + "key": "1", + "text": "{{anc_site_characteristics.step1.site_anc_hiv.options.1.text}}", + "translation_text": "anc_site_characteristics.step1.site_anc_hiv.options.1.text" + }, + { + "key": "0", + "text": "{{anc_site_characteristics.step1.site_anc_hiv.options.0.text}}", + "translation_text": "anc_site_characteristics.step1.site_anc_hiv.options.0.text" + } + ], + "value": "", + "v_required": { + "value": "false", + "err": "{{anc_site_characteristics.step1.site_anc_hiv.v_required.err}}" + } + }, + { + "key": "site_ultrasound", + "title": "Ketersediaan alat USG", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_site_characteristics.step1.site_ultrasound.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "1", + "text": "{{anc_site_characteristics.step1.site_ultrasound.options.1.text}}", + "translation_text": "anc_site_characteristics.step1.site_ultrasound.options.1.text" + }, + { + "key": "0", + "text": "{{anc_site_characteristics.step1.site_ultrasound.options.0.text}}", + "translation_text": "anc_site_characteristics.step1.site_ultrasound.options.0.text" + } + ], + "value": "", + "v_required": { + "value": "true", + "err": "{{anc_site_characteristics.step1.site_ultrasound.v_required.err}}" + } + }, + { + "key": "site_bp_tool", + "title": "Ketersediaan pengukur tekanan darah otomatis", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "openmrs_data_type": "", + "type": "native_radio", + "label": "{{anc_site_characteristics.step1.site_bp_tool.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "1", + "text": "{{anc_site_characteristics.step1.site_bp_tool.options.1.text}}", + "translation_text": "anc_site_characteristics.step1.site_bp_tool.options.1.text" + }, + { + "key": "0", + "text": "{{anc_site_characteristics.step1.site_bp_tool.options.0.text}}", + "translation_text": "anc_site_characteristics.step1.site_bp_tool.options.0.text" + } + ], + "value": "", + "v_required": { + "value": "true", + "err": "{{anc_site_characteristics.step1.site_ultrasound.v_required.err}}" + } + } + ] + }, + "properties_file_name": "anc_site_characteristics" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/anc_symptoms_follow_up.json b/opensrp-anc/src/main/assets/json.form/anc_symptoms_follow_up.json index 5e7a5fccd..a42d0e423 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_symptoms_follow_up.json +++ b/opensrp-anc/src/main/assets/json.form/anc_symptoms_follow_up.json @@ -1,2270 +1,2379 @@ { - "validate_on_submit": true, - "display_scroll_bars": true, - "skip_blank_steps": true, - "count": "4", - "encounter_type": "Symptoms and Follow-up", - "entity_id": "", - "relational_id": "", - "form_version": "0.0.1", - "filtered_items": [ - "step2_behaviour_persist", - "step3_phys_symptoms_persist", - "step3_other_symptoms_persist" - ], - "default_values": [ - "medications", - "medications_other", - "phys_symptoms_persist", - "other_sym_lbpp", - "other_sym_vvo", - "other_symptoms_persist", - "ipv_physical_signs_symptoms" - ], - "global_previous": [ - "caffeine_intake", - "tobacco_user", - "shs_exposure", - "condom_use", - "alcohol_substance_use", - "phys_symptoms", - "other_symptoms", - "calcium_supp", - "vita_supp", - "syphilis_positive", - "pe_risk_aspirin_calcium", - "pe_risk_aspirin", - "ifa_high_prev", - "ifa_low_prev", - "ifa_weekly", - "ifa_anaemia", - "ipv_physical_signs_symptoms" - ], - "metadata": { - "start": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "start", - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "end": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "end", - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "today": { - "openmrs_entity_parent": "", - "openmrs_entity": "encounter", - "openmrs_entity_id": "encounter_date" - }, - "deviceid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "deviceid", - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "subscriberid": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "subscriberid", - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "simserial": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "simserial", - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "phonenumber": { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_data_type": "phonenumber", - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "encounter_location": "", - "look_up": { - "entity_id": "", - "value": "" - } - }, - "step1": { - "title": "{{anc_symptoms_follow_up.step1.title}}", - "next": "step2", - "fields": [ - { - "key": "medications", - "openmrs_entity_parent": "160741AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step1.medications.label}}", - "label_info_text": "The woman reported taking these medications in the previous contact. Un-select the medications that she has stopped taking. If still taking, leave them selected.", - "label_info_title": "Medication follow-up", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "dont_know", - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step1.medications.options.none.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.none.text", - "value": false, - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "", - "openmrs_entity": "concept" - }, - { - "key": "dont_know", - "text": "{{anc_symptoms_follow_up.step1.medications.options.dont_know.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.dont_know.text", - "value": false, - "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "", - "openmrs_entity": "concept" - }, - { - "key": "antacids", - "text": "{{anc_symptoms_follow_up.step1.medications.options.antacids.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.antacids.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "944AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "aspirin", - "text": "{{anc_symptoms_follow_up.step1.medications.options.aspirin.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.aspirin.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "71617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "calcium", - "text": "{{anc_symptoms_follow_up.step1.medications.options.calcium.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.calcium.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "doxylamine", - "text": "{{anc_symptoms_follow_up.step1.medications.options.doxylamine.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.doxylamine.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "75229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "folic_acid", - "text": "{{anc_symptoms_follow_up.step1.medications.options.folic_acid.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.folic_acid.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "76613AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "iron", - "text": "{{anc_symptoms_follow_up.step1.medications.options.iron.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.iron.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "78218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "magnesium", - "text": "{{anc_symptoms_follow_up.step1.medications.options.magnesium.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.magnesium.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "79224AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "metoclopramide", - "text": "{{anc_symptoms_follow_up.step1.medications.options.metoclopramide.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.metoclopramide.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "79755AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "vitamina", - "text": "{{anc_symptoms_follow_up.step1.medications.options.vitamina.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.vitamina.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "86339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "analgesic", - "text": "{{anc_symptoms_follow_up.step1.medications.options.analgesic.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.analgesic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165231AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_convulsive", - "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_convulsive.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_convulsive.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165230AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_diabetic", - "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_diabetic.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_diabetic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "159460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anthelmintic", - "text": "{{anc_symptoms_follow_up.step1.medications.options.anthelmintic.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.anthelmintic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_hypertensive", - "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_hypertensive.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_hypertensive.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165237AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "anti_malarials", - "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_malarials.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_malarials.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "5839AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "antivirals", - "text": "{{anc_symptoms_follow_up.step1.medications.options.antivirals.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.antivirals.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165236AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "arvs", - "text": "{{anc_symptoms_follow_up.step1.medications.options.arvs.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.arvs.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "prep_hiv", - "text": "{{anc_symptoms_follow_up.step1.medications.options.prep_hiv.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.prep_hiv.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "antitussive", - "text": "{{anc_symptoms_follow_up.step1.medications.options.antitussive.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.antitussive.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165235AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "asthma", - "text": "{{anc_symptoms_follow_up.step1.medications.options.asthma.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.asthma.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165234AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "cotrimoxazole", - "text": "{{anc_symptoms_follow_up.step1.medications.options.cotrimoxazole.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.cotrimoxazole.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "105281AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "antibiotics", - "text": "{{anc_symptoms_follow_up.step1.medications.options.antibiotics.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.antibiotics.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1195AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "hematinic", - "text": "{{anc_symptoms_follow_up.step1.medications.options.hematinic.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.hematinic.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165233AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "hemorrhoidal", - "text": "{{anc_symptoms_follow_up.step1.medications.options.hemorrhoidal.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.hemorrhoidal.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165255AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "multivitamin", - "text": "{{anc_symptoms_follow_up.step1.medications.options.multivitamin.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.multivitamin.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "461AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "thyroid", - "text": "{{anc_symptoms_follow_up.step1.medications.options.thyroid.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.thyroid.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "other", - "text": "{{anc_symptoms_follow_up.step1.medications.options.other.text}}", - "translation_text": "anc_symptoms_follow_up.step1.medications.options.other.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step1.medications.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "medications_other", - "openmrs_entity_parent": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_symptoms_follow_up.step1.medications_other.hint}}", - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_symptoms_follow_up.step1.medications_other.v_regex.err}}" - }, - "relevance": { - "step1:medications": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "calcium_comply", - "openmrs_entity_parent": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step1.calcium_comply.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_symptoms_follow_up.step1.calcium_comply.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_symptoms_follow_up.step1.calcium_comply.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "calcium_effects", - "openmrs_entity_parent": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step1.calcium_effects.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_symptoms_follow_up.step1.calcium_effects.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_symptoms_follow_up.step1.calcium_effects.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "ifa_comply", - "openmrs_entity_parent": "104677AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step1.ifa_comply.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_symptoms_follow_up.step1.ifa_comply.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_symptoms_follow_up.step1.ifa_comply.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "ifa_effects", - "openmrs_entity_parent": "104677AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step1.ifa_effects.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_symptoms_follow_up.step1.ifa_effects.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_symptoms_follow_up.step1.ifa_effects.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "aspirin_comply", - "openmrs_entity_parent": "71617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step1.aspirin_comply.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_symptoms_follow_up.step1.aspirin_comply.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_symptoms_follow_up.step1.aspirin_comply.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "vita_comply", - "openmrs_entity_parent": "86339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step1.vita_comply.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "yes", - "text": "{{anc_symptoms_follow_up.step1.vita_comply.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_symptoms_follow_up.step1.vita_comply.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "penicillin_comply", - "openmrs_entity_parent": "81724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step1.penicillin_comply.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "label_info_text": "{{anc_symptoms_follow_up.step1.penicillin_comply.label_info_text}}", - "label_info_title": "{{anc_symptoms_follow_up.step1.penicillin_comply.label_info_title}}", - "options": [ - { - "key": "yes", - "text": "{{anc_symptoms_follow_up.step1.penicillin_comply.options.yes.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "no", - "text": "{{anc_symptoms_follow_up.step1.penicillin_comply.options.no.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - } - ] - }, - "step2": { - "title": "{{anc_symptoms_follow_up.step2.title}}", - "next": "step3", - "fields": [ - { - "key": "behaviour_persist", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165251AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step2.behaviour_persist.label}}", - "label_info_text": "These behaviours were reported in the previous contact. Select the ones that are still occurring or select \"None\".", - "label_info_title": "Previous behaviours", - "label_text_style": "bold", - "text_color": "#000000", - "filter_options": [ - { - "key": "global_previous_tobacco_user", - "value": "[yes, recently_quit]" - }, - { - "key": "global_previous_condom_use", - "value": "no" - }, - { - "key": "global_previous_shs_exposure", - "value": "yes" - }, - { - "key": "global_previous_alcohol_substance_use", - "value": "!none", - "options": [ - "alcohol_use", - "substance_use" - ] - }, - { - "key": "global_previous_caffeine_intake", - "value": "!none" - } - ], - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "caffeine_intake", - "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.caffeine_intake.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165249AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "label_info_text": "High caffeine intake means consuming more than 300 mg of caffeine per day. Each of the following represents 300 mg of caffeine:\n - More than 2 cups of coffee (brewed, filtered, instant or espresso)\n - More than 4 cups of tea\n - More than 12 bars (50 g) of chocolate\n - More than one can of soda or energy drink\n\nPlease indicate if the woman consumes more than these amounts per day.", - "label_info_title": "High caffeine intake", - "openmrs_entity_parent": "" - }, - { - "key": "tobacco_user", - "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.tobacco_user.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "152722AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "shs_exposure", - "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.shs_exposure.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "152721AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "condom_use", - "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.condom_use.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165250AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "alcohol_use", - "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.alcohol_use.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "143098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "substance_use", - "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.substance_use.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "160246AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step2.behaviour_persist.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster0", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step2.toaster0.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster0.toaster_info_text}}", - "toaster_info_title": "{{anc_symptoms_follow_up.step2.toaster0.toaster_info_title}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step2:behaviour_persist": { - "ex-checkbox": [ - { - "or": [ - "caffeine_intake" - ] - } - ] - } - } - }, - { - "key": "toaster1", - "openmrs_entity_parent": "", - "openmrs_entity": "TOBACCO USE COUNSELLING", - "openmrs_entity_id": "1455", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step2.toaster1.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster1.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "step2:behaviour_persist": { - "ex-checkbox": [ - { - "or": [ - "tobacco_user" - ] - } - ] - } - } - }, - { - "key": "toaster2", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step2.toaster2.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster2.toaster_info_text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step2:behaviour_persist": { - "ex-checkbox": [ - { - "or": [ - "shs_exposure" - ] - } - ] - } - } - }, - { - "key": "toaster3", - "openmrs_entity_parent": "", - "openmrs_entity": "Counseling regarding condom", - "openmrs_entity_id": "161594", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step2.toaster3.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster3.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "step2:behaviour_persist": { - "ex-checkbox": [ - { - "or": [ - "condom_use" - ] - } - ] - } - } - }, - { - "key": "toaster4", - "openmrs_entity_parent": "", - "openmrs_entity": "ALCOHOL COUNSELING", - "openmrs_entity_id": "1288", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step2.toaster4.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster4.toaster_info_text}}", - "text_color": "#E20000", - "toaster_type": "problem", - "relevance": { - "step2:behaviour_persist": { - "ex-checkbox": [ - { - "or": [ - "alcohol_use", - "substance_use" - ] - } - ] - } - } - } - ] - }, - "step3": { - "title": "{{anc_symptoms_follow_up.step3.title}}", - "next": "step4", - "fields": [ - { - "key": "phys_symptoms_persist", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.label}}", - "label_info_text": "These symptoms were reported in the previous contact. Select the ones that are still occurring or select \"None\".", - "label_info_title": "Previous Symptoms", - "label_text_style": "bold", - "text_color": "#000000", - "filter_options_source": "global_previous_phys_symptoms", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.none.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.none.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "nausea_vomiting", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.nausea_vomiting.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.nausea_vomiting.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "133473AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "heartburn", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.heartburn.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.heartburn.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "139059AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "leg_cramps", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.leg_cramps.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.leg_cramps.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "135969AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "constipation", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.constipation.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.constipation.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "996AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "low_back_pain", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.low_back_pain.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.low_back_pain.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "116225AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "pelvic_pain", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.pelvic_pain.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.pelvic_pain.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "131034AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "varicose_veins", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.varicose_veins.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.varicose_veins.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "156666AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "oedema", - "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.oedema.text}}", - "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.oedema.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "other_sym_lbpp", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "contractions", - "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.contractions.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "163750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "dysuria", - "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.dysuria.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "118771AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "pelvic_pains", - "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.pelvic_pains.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165270AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.v_required.err}}" - }, - "relevance": { - "step3:phys_symptoms_persist": { - "ex-checkbox": [ - { - "or": [ - "low_back_pain", - "pelvic_pain" - ] - } - ] - } - } - }, - { - "key": "other_sym_vvo", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step3.other_sym_vvo.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step3.other_sym_vvo.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "leg_pain", - "text": "{{anc_symptoms_follow_up.step3.other_sym_vvo.options.leg_pain.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "114395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "leg_redness", - "text": "{{anc_symptoms_follow_up.step3.other_sym_vvo.options.leg_redness.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step3.other_sym_vvo.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster5", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster5.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster5.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step3:phys_symptoms_persist": { - "ex-checkbox": [ - { - "or": [ - "nausea_vomiting" - ] - } - ] - } - } - }, - { - "key": "toaster6", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster6.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster6.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step3:phys_symptoms_persist": { - "ex-checkbox": [ - { - "or": [ - "heartburn" - ] - } - ] - } - } - }, - { - "key": "toaster7", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster7.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster7.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step3:phys_symptoms_persist": { - "ex-checkbox": [ - { - "or": [ - "leg_cramps" - ] - } - ] - } - } - }, - { - "key": "toaster8", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster8.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster8.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step3:phys_symptoms_persist": { - "ex-checkbox": [ - { - "or": [ - "constipation" - ] - } - ] - } - } - }, - { - "key": "toaster9", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster9.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster9.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster10", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster10.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step3:other_sym_lbpp": { - "ex-checkbox": [ - { - "or": [ - "contractions", - "pelvic_pains" - ] - } - ] - } - } - }, - { - "key": "toaster11", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster11.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster11.toaster_info_text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step3:other_sym_lbpp": { - "ex-checkbox": [ - { - "or": [ - "dysuria" - ] - } - ] - } - } - }, - { - "key": "toaster12", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster12.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster12.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster13", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step3.toaster13.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step3:other_sym_vvo": { - "ex-checkbox": [ - { - "or": [ - "leg_pain", - "leg_redness" - ] - } - ] - } - } - }, - { - "key": "other_symptoms_persist", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.label}}", - "label_text_style": "bold", - "label_info_text": "These symptoms were reported in the previous contact. Select the ones that are still occurring or select \"None\".", - "label_info_title": "Previous Symptoms", - "text_color": "#000000", - "filter_options_source": "global_previous_other_symptoms", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "abnormal_vaginal_discharge", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.abnormal_vaginal_discharge.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "123395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "breathing_difficulty", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.breathing_difficulty.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "142373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "breathless", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.breathless.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "110265AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "cough", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.cough.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1487AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "fever", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.fever.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "140238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "easily_tired", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.easily_tired.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "140501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "headache", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.headache.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "vaginal_bleeding", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.vaginal_bleeding.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "147232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "visual_disturbance", - "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.visual_disturbance.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "123074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - } - ] - }, - "step4": { - "title": "{{anc_symptoms_follow_up.step4.title}}", - "fields": [ - { - "key": "phys_symptoms", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step4.phys_symptoms.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.none.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.none.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "nausea_vomiting", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.nausea_vomiting.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.nausea_vomiting.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "133473AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "heartburn", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.heartburn.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.heartburn.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "139059AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "leg_cramps", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.leg_cramps.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.leg_cramps.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "135969AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "constipation", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.constipation.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.constipation.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "996AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "low_back_pain", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.low_back_pain.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.low_back_pain.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "116225AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "pelvic_pain", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.pelvic_pain.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.pelvic_pain.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "131034AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "varicose_veins", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.varicose_veins.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.varicose_veins.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "156666AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "oedema", - "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.oedema.text}}", - "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.oedema.text", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step4.phys_symptoms.v_required.err}}" - } - }, - { - "key": "other_sym_lbpp", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "contractions", - "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.contractions.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "163750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "dysuria", - "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.dysuria.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "118771AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "pelvic_pains", - "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.pelvic_pains.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165270AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.v_required.err}}" - }, - "relevance": { - "step4:phys_symptoms": { - "ex-checkbox": [ - { - "or": [ - "low_back_pain", - "pelvic_pain" - ] - } - ] - } - } - }, - { - "key": "other_sym_vvo", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step4.other_sym_vvo.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step4.other_sym_vvo.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "leg_pain", - "text": "{{anc_symptoms_follow_up.step4.other_sym_vvo.options.leg_pain.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "114395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "leg_redness", - "text": "{{anc_symptoms_follow_up.step4.other_sym_vvo.options.leg_redness.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "165215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step4.other_sym_vvo.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster14", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster14.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster14.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step4:phys_symptoms": { - "ex-checkbox": [ - { - "or": [ - "nausea_vomiting" - ] - } - ] - } - } - }, - { - "key": "toaster15", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster15.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster15.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step4:phys_symptoms": { - "ex-checkbox": [ - { - "or": [ - "heartburn" - ] - } - ] - } - } - }, - { - "key": "toaster16", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster16.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster16.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step4:phys_symptoms": { - "ex-checkbox": [ - { - "or": [ - "leg_cramps" - ] - } - ] - } - } - }, - { - "key": "toaster17", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster17.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster17.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "step4:phys_symptoms": { - "ex-checkbox": [ - { - "or": [ - "constipation" - ] - } - ] - } - } - }, - { - "key": "toaster18", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster18.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster18.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster19", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster19.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step4:other_sym_lbpp": { - "ex-checkbox": [ - { - "or": [ - "contractions", - "pelvic_pains" - ] - } - ] - } - } - }, - { - "key": "toaster20", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster20.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster20.toaster_info_text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step4:other_sym_lbpp": { - "ex-checkbox": [ - { - "or": [ - "dysuria" - ] - } - ] - } - } - }, - { - "key": "toaster21", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster21.text}}", - "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster21.toaster_info_text}}", - "text_color": "#4855B3", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster22", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster22.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "step4:other_sym_vvo": { - "ex-checkbox": [ - { - "or": [ - "leg_pain", - "leg_redness" - ] - } - ] - } - } - }, - { - "key": "other_symptoms", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step4.other_symptoms.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "abnormal_vaginal_discharge", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.abnormal_vaginal_discharge.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "123395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "breathing_difficulty", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.breathing_difficulty.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "142373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "breathless", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.breathless.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "110265AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "cough", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.cough.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1487AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "fever", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.fever.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "140238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "easily_tired", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.easily_tired.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "140501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "headache", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.headache.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "vaginal_bleeding", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.vaginal_bleeding.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "147232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "visual_disturbance", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.visual_disturbance.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "123074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "other", - "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.other.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step4.other_symptoms.v_required.err}}" - } - }, - { - "key": "other_symptoms_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{anc_symptoms_follow_up.step4.other_symptoms_other.hint}}", - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_symptoms_follow_up.step4.other_symptoms_other.v_regex.err}}" - }, - "relevance": { - "step4:other_symptoms": { - "ex-checkbox": [ - { - "or": [ - "other" - ] - } - ] - } - } - }, - { - "key": "ipv_signs_symptoms", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "check_box", - "label": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.label}}", - "label_info_text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.label_info_text}}", - "label_info_title": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.label_info_title}}", - "label_text_style": "bold", - "text_color": "#000000", - "exclusive": [ - "none" - ], - "options": [ - { - "key": "none", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.none.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "stress", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.stress.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "anxiety", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.anxiety.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "depression", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.depression.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "emotional_health_issues", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.emotional_health_issues.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "alcohol_misuse", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.alcohol_misuse.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "drugs_misuse", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.drugs_misuse.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "harmful_behaviour", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.harmful_behaviour.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "suicide_thoughts", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_thoughts.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "suicide_plans", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_plans.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "suicide_acts", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_acts.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "repeat_stis", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_stis.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "unwanted_pregnancies", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.unwanted_pregnancies.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "chronic_pain", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.chronic_pain.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "gastro_symptoms", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.gastro_symptoms.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "genitourinary_symptoms", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.genitourinary_symptoms.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "adverse_repro_outcomes", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.adverse_repro_outcomes.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "unexplained_repro_symptoms", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.unexplained_repro_symptoms.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "repeat_vaginal_bleeding", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_vaginal_bleeding.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "injury_abdomen", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.injury_abdomen.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "injury_other", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.injury_other.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "problems_cns", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.problems_cns.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "repeat_health_consultations", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_health_consultations.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "intrusive_partner", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.intrusive_partner.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "misses_appointments", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.misses_appointments.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - }, - { - "key": "children_emotional_problems", - "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.children_emotional_problems.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "ipv_signs_symptoms_injury_other", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "edit_text", - "hint": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms_injury_other.hint}}", - "v_regex": { - "value": "[A-Za-z\\s\\.\\-]*", - "err": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms_injury_other.v_regex.err}}" - }, - "relevance": { - "step4:ipv_signs_symptoms": { - "ex-checkbox": [ - { - "or": [ - "injury_other" - ] - } - ] - } - } - }, - { - "key": "ipv_suspect", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "hidden", - "value": "", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_calculation_rules.yml" - } - } - } - }, - { - "key": "toaster23", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{anc_symptoms_follow_up.step4.toaster23.text}}", - "text_color": "#D56900", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - } - }, - { - "key": "mat_percept_fetal_move", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "162107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "options": [ - { - "key": "normal_fetal_move", - "text": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.normal_fetal_move.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "162108AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "reduced_fetal_move", - "text": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.reduced_fetal_move.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "113377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - }, - { - "key": "no_fetal_move", - "text": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.no_fetal_move.text}}", - "value": false, - "openmrs_entity": "concept", - "openmrs_entity_id": "1452AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "sf_relevance_rules.yml" - } - } - }, - "v_required": { - "value": "true", - "err": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.v_required.err}}" - } - } - ] - }, - "properties_file_name": "anc_symptoms_follow_up" + "validate_on_submit": true, + "display_scroll_bars": true, + "skip_blank_steps": true, + "count": "4", + "encounter_type": "anc_symptoms_follow_up", + "entity_id": "", + "relational_id": "", + "form_version": "0.0.1", + "filtered_items": [ + "step2_behaviour_persist", + "step3_phys_symptoms_persist", + "step3_other_symptoms_persist" + ], + "default_values": [ + "medications", + "medications_other", + "phys_symptoms_persist", + "other_sym_lbpp", + "other_sym_vvo", + "other_symptoms_persist", + "ipv_physical_signs_symptoms" + ], + "global_previous": [ + "caffeine_intake", + "tobacco_user", + "shs_exposure", + "condom_use", + "alcohol_substance_use", + "phys_symptoms", + "other_symptoms", + "calcium_supp", + "vita_supp", + "syphilis_positive", + "pe_risk_aspirin_calcium", + "pe_risk_aspirin", + "ifa_high_prev", + "ifa_low_prev", + "ifa_weekly", + "ifa_anaemia", + "ipv_physical_signs_symptoms" + ], + "metadata": { + "start": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "start", + "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "end": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "end", + "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "today": { + "openmrs_entity_parent": "", + "openmrs_entity": "encounter", + "openmrs_entity_id": "encounter_date" + }, + "deviceid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "deviceid", + "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "subscriberid": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "subscriberid", + "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "simserial": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "simserial", + "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "phonenumber": { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_data_type": "phonenumber", + "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "encounter_location": "", + "look_up": { + "entity_id": "", + "value": "" + } + }, + "step1": { + "title": "{{anc_symptoms_follow_up.step1.title}}", + "next": "step2", + "fields": [ + { + "key": "medications", + "openmrs_entity_parent": "160741AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step1.medications.label}}", + "label_info_text": "{{anc_symptoms_follow_up.step1.medications.label_info_text}}", + "label_info_title": "{{anc_symptoms_follow_up.step1.medications.label_info_title}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "dont_know", + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step1.medications.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.none.text", + "value": false, + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "", + "openmrs_entity": "concept" + }, + { + "key": "dont_know", + "text": "{{anc_symptoms_follow_up.step1.medications.options.dont_know.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.dont_know.text", + "value": false, + "openmrs_entity_id": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "", + "openmrs_entity": "concept" + }, + { + "key": "antacids", + "text": "{{anc_symptoms_follow_up.step1.medications.options.antacids.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.antacids.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "944AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "aspirin", + "text": "{{anc_symptoms_follow_up.step1.medications.options.aspirin.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.aspirin.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "71617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "calcium", + "text": "{{anc_symptoms_follow_up.step1.medications.options.calcium.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.calcium.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "doxylamine", + "text": "{{anc_symptoms_follow_up.step1.medications.options.doxylamine.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.doxylamine.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "75229AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "folic_acid", + "text": "{{anc_symptoms_follow_up.step1.medications.options.folic_acid.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.folic_acid.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "76613AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "iron", + "text": "{{anc_symptoms_follow_up.step1.medications.options.iron.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.iron.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "78218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "magnesium", + "text": "{{anc_symptoms_follow_up.step1.medications.options.magnesium.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.magnesium.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "79224AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "metoclopramide", + "text": "{{anc_symptoms_follow_up.step1.medications.options.metoclopramide.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.metoclopramide.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "79755AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "vitamina", + "text": "{{anc_symptoms_follow_up.step1.medications.options.vitamina.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.vitamina.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "86339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "analgesic", + "text": "{{anc_symptoms_follow_up.step1.medications.options.analgesic.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.analgesic.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165231AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_convulsive", + "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_convulsive.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_convulsive.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165230AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_diabetic", + "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_diabetic.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_diabetic.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "159460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anthelmintic", + "text": "{{anc_symptoms_follow_up.step1.medications.options.anthelmintic.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.anthelmintic.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_hypertensive", + "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_hypertensive.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_hypertensive.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165237AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "anti_malarials", + "text": "{{anc_symptoms_follow_up.step1.medications.options.anti_malarials.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.anti_malarials.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "5839AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "antivirals", + "text": "{{anc_symptoms_follow_up.step1.medications.options.antivirals.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.antivirals.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165236AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "arvs", + "text": "{{anc_symptoms_follow_up.step1.medications.options.arvs.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.arvs.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "prep_hiv", + "text": "{{anc_symptoms_follow_up.step1.medications.options.prep_hiv.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.prep_hiv.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "antitussive", + "text": "{{anc_symptoms_follow_up.step1.medications.options.antitussive.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.antitussive.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165235AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "asthma", + "text": "{{anc_symptoms_follow_up.step1.medications.options.asthma.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.asthma.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165234AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "cotrimoxazole", + "text": "{{anc_symptoms_follow_up.step1.medications.options.cotrimoxazole.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.cotrimoxazole.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "105281AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "antibiotics", + "text": "{{anc_symptoms_follow_up.step1.medications.options.antibiotics.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.antibiotics.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1195AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "hematinic", + "text": "{{anc_symptoms_follow_up.step1.medications.options.hematinic.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.hematinic.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165233AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "hemorrhoidal", + "text": "{{anc_symptoms_follow_up.step1.medications.options.hemorrhoidal.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.hemorrhoidal.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165255AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "multivitamin", + "text": "{{anc_symptoms_follow_up.step1.medications.options.multivitamin.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.multivitamin.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "461AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "thyroid", + "text": "{{anc_symptoms_follow_up.step1.medications.options.thyroid.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.thyroid.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "other", + "text": "{{anc_symptoms_follow_up.step1.medications.options.other.text}}", + "translation_text": "anc_symptoms_follow_up.step1.medications.options.other.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step1.medications.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "medications_other", + "openmrs_entity_parent": "159367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_symptoms_follow_up.step1.medications_other.hint}}", + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_symptoms_follow_up.step1.medications_other.v_regex.err}}" + }, + "relevance": { + "step1:medications": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "calcium_comply", + "openmrs_entity_parent": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step1.calcium_comply.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_symptoms_follow_up.step1.calcium_comply.options.yes.text}}", + "translation_text": "anc_symptoms_follow_up.step1.calcium_comply.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_symptoms_follow_up.step1.calcium_comply.options.no.text}}", + "translation_text": "anc_symptoms_follow_up.step1.calcium_comply.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "calcium_effects", + "openmrs_entity_parent": "72650AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step1.calcium_effects.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_symptoms_follow_up.step1.calcium_effects.options.yes.text}}", + "translation_text": "anc_symptoms_follow_up.step1.calcium_effects.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_symptoms_follow_up.step1.calcium_effects.options.no.text}}", + "translation_text": "anc_symptoms_follow_up.step1.calcium_effects.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "ifa_comply", + "openmrs_entity_parent": "104677AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step1.ifa_comply.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_symptoms_follow_up.step1.ifa_comply.options.yes.text}}", + "translation_text": "anc_symptoms_follow_up.step1.ifa_comply.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_symptoms_follow_up.step1.ifa_comply.options.no.text}}", + "translation_text": "anc_symptoms_follow_up.step1.ifa_comply.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "ifa_effects", + "openmrs_entity_parent": "104677AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165273AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step1.ifa_effects.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_symptoms_follow_up.step1.ifa_effects.options.yes.text}}", + "translation_text": "anc_symptoms_follow_up.step1.ifa_effects.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_symptoms_follow_up.step1.ifa_effects.options.no.text}}", + "translation_text": "anc_symptoms_follow_up.step1.ifa_effects.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "aspirin_comply", + "openmrs_entity_parent": "71617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step1.aspirin_comply.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_symptoms_follow_up.step1.aspirin_comply.options.yes.text}}", + "translation_text": "anc_symptoms_follow_up.step1.aspirin_comply.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_symptoms_follow_up.step1.aspirin_comply.options.no.text}}", + "translation_text": "anc_symptoms_follow_up.step1.aspirin_comply.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "vita_comply", + "openmrs_entity_parent": "86339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step1.vita_comply.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "yes", + "text": "{{anc_symptoms_follow_up.step1.vita_comply.options.yes.text}}", + "translation_text": "anc_symptoms_follow_up.step1.vita_comply.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_symptoms_follow_up.step1.vita_comply.options.no.text}}", + "translation_text": "anc_symptoms_follow_up.step1.vita_comply.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "penicillin_comply", + "openmrs_entity_parent": "81724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step1.penicillin_comply.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "label_info_text": "{{anc_symptoms_follow_up.step1.penicillin_comply.label_info_text}}", + "label_info_title": "{{anc_symptoms_follow_up.step1.penicillin_comply.label_info_title}}", + "options": [ + { + "key": "yes", + "text": "{{anc_symptoms_follow_up.step1.penicillin_comply.options.yes.text}}", + "translation_text": "anc_symptoms_follow_up.step1.penicillin_comply.options.yes.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "no", + "text": "{{anc_symptoms_follow_up.step1.penicillin_comply.options.no.text}}", + "translation_text": "anc_symptoms_follow_up.step1.penicillin_comply.options.no.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + } + ] + }, + "step2": { + "title": "{{anc_symptoms_follow_up.step2.title}}", + "next": "step3", + "fields": [ + { + "key": "behaviour_persist", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165251AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step2.behaviour_persist.label}}", + "label_info_text": "{{anc_symptoms_follow_up.step2.behaviour_persist.label_info_text}}", + "label_info_title": "{{anc_symptoms_follow_up.step2.behaviour_persist.label_info_title}}", + "label_text_style": "bold", + "text_color": "#000000", + "filter_options": [ + { + "key": "global_previous_tobacco_user", + "value": "[yes, recently_quit]" + }, + { + "key": "global_previous_condom_use", + "value": "no" + }, + { + "key": "global_previous_shs_exposure", + "value": "yes" + }, + { + "key": "global_previous_alcohol_substance_use", + "value": "!none", + "options": [ + "alcohol_use", + "substance_use" + ] + }, + { + "key": "global_previous_caffeine_intake", + "value": "!none" + } + ], + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step2.behaviour_persist.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "caffeine_intake", + "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.caffeine_intake.text}}", + "translation_text": "anc_symptoms_follow_up.step2.behaviour_persist.options.caffeine_intake.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165249AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label_info_text": "{{anc_symptoms_follow_up.step2.behaviour_persist.caffeine_intake.label_info_text}}", + "label_info_title": "{{anc_symptoms_follow_up.step2.behaviour_persist.caffeine_intake.label_info_title}}", + "openmrs_entity_parent": "" + }, + { + "key": "tobacco_user", + "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.tobacco_user.text}}", + "translation_text": "anc_symptoms_follow_up.step2.behaviour_persist.options.tobacco_user.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "152722AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "shs_exposure", + "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.shs_exposure.text}}", + "translation_text": "anc_symptoms_follow_up.step2.behaviour_persist.options.shs_exposure.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "152721AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "condom_use", + "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.condom_use.text}}", + "translation_text": "anc_symptoms_follow_up.step2.behaviour_persist.options.condom_use.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165250AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "alcohol_use", + "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.alcohol_use.text}}", + "translation_text": "anc_symptoms_follow_up.step2.behaviour_persist.options.alcohol_use.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "143098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "substance_use", + "text": "{{anc_symptoms_follow_up.step2.behaviour_persist.options.substance_use.text}}", + "translation_text": "anc_symptoms_follow_up.step2.behaviour_persist.options.substance_use.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "160246AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step2.behaviour_persist.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "toaster0", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step2.toaster0.text}}", + "translation_text": "anc_symptoms_follow_up.step2.toaster0.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster0.toaster_info_text}}", + "toaster_info_title": "{{anc_symptoms_follow_up.step2.toaster0.toaster_info_title}}", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step2:behaviour_persist": { + "ex-checkbox": [ + { + "or": [ + "caffeine_intake" + ] + } + ] + } + } + }, + { + "key": "toaster1", + "openmrs_entity_parent": "", + "openmrs_entity": "TOBACCO USE COUNSELLING", + "openmrs_entity_id": "1455", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step2.toaster1.text}}", + "translation_text": "anc_symptoms_follow_up.step2.toaster1.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster1.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "step2:behaviour_persist": { + "ex-checkbox": [ + { + "or": [ + "tobacco_user" + ] + } + ] + } + } + }, + { + "key": "toaster2", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step2.toaster2.text}}", + "translation_text": "anc_symptoms_follow_up.step2.toaster2.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster2.toaster_info_text}}", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step2:behaviour_persist": { + "ex-checkbox": [ + { + "or": [ + "shs_exposure" + ] + } + ] + } + } + }, + { + "key": "toaster3", + "openmrs_entity_parent": "", + "openmrs_entity": "Counseling regarding condom", + "openmrs_entity_id": "161594", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step2.toaster3.text}}", + "translation_text": "anc_symptoms_follow_up.step2.toaster3.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster3.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "step2:behaviour_persist": { + "ex-checkbox": [ + { + "or": [ + "condom_use" + ] + } + ] + } + } + }, + { + "key": "toaster4", + "openmrs_entity_parent": "", + "openmrs_entity": "ALCOHOL COUNSELING", + "openmrs_entity_id": "1288", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step2.toaster4.text}}", + "translation_text": "anc_symptoms_follow_up.step2.toaster4.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step2.toaster4.toaster_info_text}}", + "text_color": "#E20000", + "toaster_type": "problem", + "relevance": { + "step2:behaviour_persist": { + "ex-checkbox": [ + { + "or": [ + "alcohol_use", + "substance_use" + ] + } + ] + } + } + } + ] + }, + "step3": { + "title": "{{anc_symptoms_follow_up.step3.title}}", + "next": "step4", + "fields": [ + { + "key": "phys_symptoms_persist", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.label}}", + "label_info_text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.label_info_text}}", + "label_info_title": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.label_info_title}}", + "label_text_style": "bold", + "text_color": "#000000", + "filter_options_source": "global_previous_phys_symptoms", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "nausea_vomiting", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.nausea_vomiting.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.nausea_vomiting.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "133473AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "heartburn", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.heartburn.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.heartburn.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "139059AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "leg_cramps", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.leg_cramps.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.leg_cramps.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "135969AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "constipation", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.constipation.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.constipation.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "996AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "low_back_pain", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.low_back_pain.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.low_back_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "116225AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "pelvic_pain", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.pelvic_pain.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.pelvic_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "131034AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "varicose_veins", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.varicose_veins.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.varicose_veins.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "156666AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "oedema", + "text": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.options.oedema.text}}", + "translation_text": "anc_symptoms_follow_up.step3.phys_symptoms_persist.options.oedema.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step3.phys_symptoms_persist.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "other_sym_lbpp", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_sym_lbpp.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "contractions", + "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.contractions.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_sym_lbpp.options.contractions.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "163750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "dysuria", + "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.dysuria.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_sym_lbpp.options.dysuria.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "118771AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "pelvic_pains", + "text": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.options.pelvic_pains.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_sym_lbpp.options.pelvic_pains.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165270AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step3.other_sym_lbpp.v_required.err}}" + }, + "relevance": { + "step3:phys_symptoms_persist": { + "ex-checkbox": [ + { + "or": [ + "low_back_pain", + "pelvic_pain" + ] + } + ] + } + } + }, + { + "key": "other_sym_vvo", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step3.other_sym_vvo.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step3.other_sym_vvo.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_sym_vvo.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "leg_pain", + "text": "{{anc_symptoms_follow_up.step3.other_sym_vvo.options.leg_pain.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_sym_vvo.options.leg_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "114395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "leg_redness", + "text": "{{anc_symptoms_follow_up.step3.other_sym_vvo.options.leg_redness.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_sym_vvo.options.leg_redness.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step3.other_sym_vvo.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "toaster5", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster5.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster5.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster5.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step3:phys_symptoms_persist": { + "ex-checkbox": [ + { + "or": [ + "nausea_vomiting" + ] + } + ] + } + } + }, + { + "key": "toaster6", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster6.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster6.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster6.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step3:phys_symptoms_persist": { + "ex-checkbox": [ + { + "or": [ + "heartburn" + ] + } + ] + } + } + }, + { + "key": "toaster7", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster7.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster7.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster7.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step3:phys_symptoms_persist": { + "ex-checkbox": [ + { + "or": [ + "leg_cramps" + ] + } + ] + } + } + }, + { + "key": "toaster8", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster8.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster8.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster8.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step3:phys_symptoms_persist": { + "ex-checkbox": [ + { + "or": [ + "constipation" + ] + } + ] + } + } + }, + { + "key": "toaster9", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster9.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster9.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster9.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "toaster10", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster10.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster10.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step3:other_sym_lbpp": { + "ex-checkbox": [ + { + "or": [ + "contractions", + "pelvic_pains" + ] + } + ] + } + } + }, + { + "key": "toaster11", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster11.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster11.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster11.toaster_info_text}}", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step3:other_sym_lbpp": { + "ex-checkbox": [ + { + "or": [ + "dysuria" + ] + } + ] + } + } + }, + { + "key": "toaster12", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster12.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster12.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step3.toaster12.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "toaster13", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step3.toaster13.text}}", + "translation_text": "anc_symptoms_follow_up.step3.toaster13.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step3:other_sym_vvo": { + "ex-checkbox": [ + { + "or": [ + "leg_pain", + "leg_redness" + ] + } + ] + } + } + }, + { + "key": "other_symptoms_persist", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.label}}", + "label_text_style": "bold", + "label_info_text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.label_info_text}}", + "label_info_title": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.label_info_title}}", + "text_color": "#000000", + "filter_options_source": "global_previous_other_symptoms", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "abnormal_vaginal_discharge", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.abnormal_vaginal_discharge.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.abnormal_vaginal_discharge.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "123395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "breathing_difficulty", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.breathing_difficulty.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.breathing_difficulty.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "142373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "breathless", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.breathless.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.breathless.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "110265AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "cough", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.cough.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.cough.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1487AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "fever", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.fever.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.fever.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "140238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "easily_tired", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.easily_tired.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.easily_tired.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "140501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "headache", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.headache.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.headache.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "vaginal_bleeding", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.vaginal_bleeding.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.vaginal_bleeding.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "147232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "visual_disturbance", + "text": "{{anc_symptoms_follow_up.step3.other_symptoms_persist.options.visual_disturbance.text}}", + "translation_text": "anc_symptoms_follow_up.step3.other_symptoms_persist.options.visual_disturbance.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "123074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + } + ] + }, + "step4": { + "title": "{{anc_symptoms_follow_up.step4.title}}", + "fields": [ + { + "key": "phys_symptoms", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step4.phys_symptoms.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "nausea_vomiting", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.nausea_vomiting.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.nausea_vomiting.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "133473AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "heartburn", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.heartburn.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.heartburn.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "139059AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "leg_cramps", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.leg_cramps.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.leg_cramps.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "135969AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "constipation", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.constipation.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.constipation.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "996AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "low_back_pain", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.low_back_pain.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.low_back_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "116225AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "pelvic_pain", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.pelvic_pain.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.pelvic_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "131034AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "varicose_veins", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.varicose_veins.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.varicose_veins.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "156666AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "oedema", + "text": "{{anc_symptoms_follow_up.step4.phys_symptoms.options.oedema.text}}", + "translation_text": "anc_symptoms_follow_up.step4.phys_symptoms.options.oedema.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step4.phys_symptoms.v_required.err}}" + } + }, + { + "key": "other_sym_lbpp", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_sym_lbpp.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "contractions", + "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.contractions.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_sym_lbpp.options.contractions.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "163750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "dysuria", + "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.dysuria.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_sym_lbpp.options.dysuria.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "118771AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "pelvic_pains", + "text": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.options.pelvic_pains.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_sym_lbpp.options.pelvic_pains.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165270AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step4.other_sym_lbpp.v_required.err}}" + }, + "relevance": { + "step4:phys_symptoms": { + "ex-checkbox": [ + { + "or": [ + "low_back_pain", + "pelvic_pain" + ] + } + ] + } + } + }, + { + "key": "other_sym_vvo", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step4.other_sym_vvo.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step4.other_sym_vvo.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_sym_vvo.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "leg_pain", + "text": "{{anc_symptoms_follow_up.step4.other_sym_vvo.options.leg_pain.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_sym_vvo.options.leg_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "114395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "leg_redness", + "text": "{{anc_symptoms_follow_up.step4.other_sym_vvo.options.leg_redness.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_sym_vvo.options.leg_redness.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "165215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step4.other_sym_vvo.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "toaster14", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster14.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster14.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster14.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step4:phys_symptoms": { + "ex-checkbox": [ + { + "or": [ + "nausea_vomiting" + ] + } + ] + } + } + }, + { + "key": "toaster15", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster15.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster15.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster15.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step4:phys_symptoms": { + "ex-checkbox": [ + { + "or": [ + "heartburn" + ] + } + ] + } + } + }, + { + "key": "toaster16", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster16.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster16.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster16.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step4:phys_symptoms": { + "ex-checkbox": [ + { + "or": [ + "leg_cramps" + ] + } + ] + } + } + }, + { + "key": "toaster17", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster17.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster17.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster17.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "step4:phys_symptoms": { + "ex-checkbox": [ + { + "or": [ + "constipation" + ] + } + ] + } + } + }, + { + "key": "toaster18", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster18.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster18.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster18.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "toaster19", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster19.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster19.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step4:other_sym_lbpp": { + "ex-checkbox": [ + { + "or": [ + "contractions", + "pelvic_pains" + ] + } + ] + } + } + }, + { + "key": "toaster20", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster20.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster20.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster20.toaster_info_text}}", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step4:other_sym_lbpp": { + "ex-checkbox": [ + { + "or": [ + "dysuria" + ] + } + ] + } + } + }, + { + "key": "toaster21", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster21.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster21.text", + "toaster_info_text": "{{anc_symptoms_follow_up.step4.toaster21.toaster_info_text}}", + "text_color": "#4855B3", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "toaster22", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster22.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster22.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "step4:other_sym_vvo": { + "ex-checkbox": [ + { + "or": [ + "leg_pain", + "leg_redness" + ] + } + ] + } + } + }, + { + "key": "other_symptoms", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step4.other_symptoms.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "abnormal_vaginal_discharge", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.abnormal_vaginal_discharge.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.abnormal_vaginal_discharge.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "123395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "breathing_difficulty", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.breathing_difficulty.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.breathing_difficulty.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "142373AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "breathless", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.breathless.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.breathless.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "110265AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "cough", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.cough.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.cough.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1487AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "fever", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.fever.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.fever.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "140238AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "easily_tired", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.easily_tired.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.easily_tired.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "140501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "headache", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.headache.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.headache.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "vaginal_bleeding", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.vaginal_bleeding.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.vaginal_bleeding.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "147232AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "visual_disturbance", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.visual_disturbance.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.visual_disturbance.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "123074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "other", + "text": "{{anc_symptoms_follow_up.step4.other_symptoms.options.other.text}}", + "translation_text": "anc_symptoms_follow_up.step4.other_symptoms.options.other.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step4.other_symptoms.v_required.err}}" + } + }, + { + "key": "other_symptoms_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{anc_symptoms_follow_up.step4.other_symptoms_other.hint}}", + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_symptoms_follow_up.step4.other_symptoms_other.v_regex.err}}" + }, + "relevance": { + "step4:other_symptoms": { + "ex-checkbox": [ + { + "or": [ + "other" + ] + } + ] + } + } + }, + { + "key": "ipv_signs_symptoms", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "check_box", + "label": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.label}}", + "label_info_text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.label_info_text}}", + "label_info_title": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.label_info_title}}", + "label_text_style": "bold", + "text_color": "#000000", + "exclusive": [ + "none" + ], + "options": [ + { + "key": "none", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.none.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.none.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "stress", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.stress.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.stress.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "anxiety", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.anxiety.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.anxiety.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "depression", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.depression.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.depression.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "emotional_health_issues", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.emotional_health_issues.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.emotional_health_issues.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "alcohol_misuse", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.alcohol_misuse.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.alcohol_misuse.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "drugs_misuse", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.drugs_misuse.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.drugs_misuse.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "harmful_behaviour", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.harmful_behaviour.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.harmful_behaviour.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "suicide_thoughts", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_thoughts.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_thoughts.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "suicide_plans", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_plans.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_plans.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "suicide_acts", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_acts.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.suicide_acts.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "repeat_stis", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_stis.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_stis.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "unwanted_pregnancies", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.unwanted_pregnancies.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.unwanted_pregnancies.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "chronic_pain", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.chronic_pain.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.chronic_pain.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "gastro_symptoms", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.gastro_symptoms.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.gastro_symptoms.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "genitourinary_symptoms", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.genitourinary_symptoms.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.genitourinary_symptoms.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "adverse_repro_outcomes", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.adverse_repro_outcomes.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.adverse_repro_outcomes.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "unexplained_repro_symptoms", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.unexplained_repro_symptoms.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.unexplained_repro_symptoms.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "repeat_vaginal_bleeding", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_vaginal_bleeding.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_vaginal_bleeding.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "injury_abdomen", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.injury_abdomen.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.injury_abdomen.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "injury_other", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.injury_other.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.injury_other.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "problems_cns", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.problems_cns.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.problems_cns.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "repeat_health_consultations", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_health_consultations.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.repeat_health_consultations.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "intrusive_partner", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.intrusive_partner.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.intrusive_partner.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "misses_appointments", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.misses_appointments.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.misses_appointments.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + }, + { + "key": "children_emotional_problems", + "text": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.children_emotional_problems.text}}", + "translation_text": "anc_symptoms_follow_up.step4.ipv_signs_symptoms.options.children_emotional_problems.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "ipv_signs_symptoms_injury_other", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "", + "type": "edit_text", + "hint": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms_injury_other.hint}}", + "v_regex": { + "value": "[A-Za-z\\s\\.\\-]*", + "err": "{{anc_symptoms_follow_up.step4.ipv_signs_symptoms_injury_other.v_regex.err}}" + }, + "relevance": { + "step4:ipv_signs_symptoms": { + "ex-checkbox": [ + { + "or": [ + "injury_other" + ] + } + ] + } + } + }, + { + "key": "ipv_suspect", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "hidden", + "value": "", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_calculation_rules.yml" + } + } + } + }, + { + "key": "toaster23", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{anc_symptoms_follow_up.step4.toaster23.text}}", + "translation_text": "anc_symptoms_follow_up.step4.toaster23.text", + "text_color": "#D56900", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + } + }, + { + "key": "mat_percept_fetal_move", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "162107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "options": [ + { + "key": "normal_fetal_move", + "text": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.normal_fetal_move.text}}", + "translation_text": "anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.normal_fetal_move.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "162108AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "reduced_fetal_move", + "text": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.reduced_fetal_move.text}}", + "translation_text": "anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.reduced_fetal_move.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "113377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + }, + { + "key": "no_fetal_move", + "text": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.no_fetal_move.text}}", + "translation_text": "anc_symptoms_follow_up.step4.mat_percept_fetal_move.options.no_fetal_move.text", + "value": false, + "openmrs_entity": "concept", + "openmrs_entity_id": "1452AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_parent": "" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "sf_relevance_rules.yml" + } + } + }, + "v_required": { + "value": "true", + "err": "{{anc_symptoms_follow_up.step4.mat_percept_fetal_move.v_required.err}}" + } + } + ] + }, + "properties_file_name": "anc_symptoms_follow_up" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/anc_test.json b/opensrp-anc/src/main/assets/json.form/anc_test.json index 812366a55..1494e0fb5 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_test.json +++ b/opensrp-anc/src/main/assets/json.form/anc_test.json @@ -2,7 +2,7 @@ "validate_on_submit": true, "display_scroll_bars": true, "count": "2", - "encounter_type": "Tests", + "encounter_type": "anc_test", "entity_id": "", "relational_id": "", "form_version": "0.0.1", @@ -361,44 +361,6 @@ } } }, - { - "key": "accordion_covid-19", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "text": "{{anc_test.step2.accordion_covid_19.text}}", - "accordion_info_text": "{{anc_test.step2.accordion_covid_19.text}}", - "accordion_info_title": "{{anc_test.step2.accordion_covid_19.text}}", - "type": "expansion_panel", - "content_form": "tests_covid_19_sub_form", - "container": "anc_test", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_expansion_panel_relevance_rules.yml" - } - } - } - }, - { - "key": "accordion_toxo", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "text": "{{anc_test.step2.accordion_toxo.text}}", - "accordion_info_text": "{{anc_test.step2.accordion_toxo.info.text}}", - "accordion_info_title": "{{anc_test.step2.accordion_toxo.text}}", - "type": "expansion_panel", - "content_form": "tests_toxo_sub_form", - "container": "anc_test", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_expansion_panel_relevance_rules.yml" - } - } - } - }, { "key": "accordion_syphilis", "openmrs_entity_parent": "", diff --git a/opensrp-anc/src/main/assets/json.form/anc_test_tasks.json b/opensrp-anc/src/main/assets/json.form/anc_test_tasks.json index ddd8da993..e8ef1ef7c 100644 --- a/opensrp-anc/src/main/assets/json.form/anc_test_tasks.json +++ b/opensrp-anc/src/main/assets/json.form/anc_test_tasks.json @@ -2,7 +2,7 @@ "validate_on_submit": true, "display_scroll_bars": true, "count": "1", - "encounter_type": "Contact Tasks", + "encounter_type": "anc_test_tasks", "entity_id": "", "relational_id": "", "form_version": "0.0.1", @@ -56,9 +56,8 @@ }, "step1": { "display_back_button": "true", - "title": "Due", - "fields": [ - ] + "title": "{{anc_test.step1.title}}", + "fields": [] }, "properties_file_name": "anc_test" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/abdominal_exam_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/abdominal_exam_sub_form.json index 124ce0d58..f72a98c2e 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/abdominal_exam_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/abdominal_exam_sub_form.json @@ -13,6 +13,7 @@ { "key": "mass_tumour", "text": "{{abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.mass_tumour.text}}", + "translation_text": "abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.mass_tumour.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "5103AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -21,6 +22,7 @@ { "key": "superficial_palpation_pain", "text": "{{abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.superficial_palpation_pain.text}}", + "translation_text": "abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.superficial_palpation_pain.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165283AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -29,6 +31,7 @@ { "key": "deep_palpation_pain", "text": "{{abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.deep_palpation_pain.text}}", + "translation_text": "abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.deep_palpation_pain.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -37,6 +40,7 @@ { "key": "painful_decompression", "text": "{{abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.painful_decompression.text}}", + "translation_text": "abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.painful_decompression.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "127866AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -45,6 +49,7 @@ { "key": "other", "text": "{{abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.other.text}}", + "translation_text": "abdominal_exam_sub_form.step1.abdominal_exam_abnormal.options.other.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/breast_exam_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/breast_exam_sub_form.json index be05f4a80..454b21cda 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/breast_exam_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/breast_exam_sub_form.json @@ -13,6 +13,7 @@ { "key": "nodule", "text": "{{breast_exam_sub_form.step1.breast_exam_abnormal.options.nodule.text}}", + "translation_text": "breast_exam_sub_form.step1.breast_exam_abnormal.options.nodule.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "146931AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -21,6 +22,7 @@ { "key": "discharge", "text": "{{breast_exam_sub_form.step1.breast_exam_abnormal.options.discharge.text}}", + "translation_text": "breast_exam_sub_form.step1.breast_exam_abnormal.options.discharge.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "142248AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -29,6 +31,7 @@ { "key": "flushing", "text": "{{breast_exam_sub_form.step1.breast_exam_abnormal.options.flushing.text}}", + "translation_text": "breast_exam_sub_form.step1.breast_exam_abnormal.options.flushing.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "140039AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -37,6 +40,7 @@ { "key": "local_pain", "text": "{{breast_exam_sub_form.step1.breast_exam_abnormal.options.local_pain.text}}", + "translation_text": "breast_exam_sub_form.step1.breast_exam_abnormal.options.local_pain.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "131021AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -45,6 +49,7 @@ { "key": "bleeding", "text": "{{breast_exam_sub_form.step1.breast_exam_abnormal.options.bleeding.text}}", + "translation_text": "breast_exam_sub_form.step1.breast_exam_abnormal.options.bleeding.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "147236AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -53,6 +58,7 @@ { "key": "increased_temperature", "text": "{{breast_exam_sub_form.step1.breast_exam_abnormal.options.increased_temperature.text}}", + "translation_text": "breast_exam_sub_form.step1.breast_exam_abnormal.options.increased_temperature.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165282AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -61,6 +67,7 @@ { "key": "other", "text": "{{breast_exam_sub_form.step1.breast_exam_abnormal.options.other.text}}", + "translation_text": "breast_exam_sub_form.step1.breast_exam_abnormal.options.other.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/cardiac_exam_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/cardiac_exam_sub_form.json index b708dd4c5..1bba926cc 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/cardiac_exam_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/cardiac_exam_sub_form.json @@ -13,6 +13,7 @@ { "key": "heart_murmur", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.heart_murmur.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.heart_murmur.text", "value": false, "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity_id": "139063AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -21,6 +22,7 @@ { "key": "weak_pulse", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.weak_pulse.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.weak_pulse.text", "value": false, "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity_id": "124823AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -29,6 +31,7 @@ { "key": "tachycardia", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.tachycardia.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.tachycardia.text", "value": false, "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity_id": "125063AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -37,6 +40,7 @@ { "key": "bradycardia", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.bradycardia.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.bradycardia.text", "value": false, "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity_id": "147020AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -45,6 +49,7 @@ { "key": "arrhythmia", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.arrhythmia.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.arrhythmia.text", "value": false, "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity_id": "120148AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -53,6 +58,7 @@ { "key": "cyanosis", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.cyanosis.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.cyanosis.text", "value": false, "openmrs_entity_parent": "165368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity_id": "143050AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -61,6 +67,7 @@ { "key": "cold_sweats", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.cold_sweats.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.cold_sweats.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165281AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -69,6 +76,7 @@ { "key": "other", "text": "{{cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.other.text}}", + "translation_text": "cardiac_exam_sub_form.step1.cardiac_exam_abnormal.options.other.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/cervical_exam_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/cervical_exam_sub_form.json index 8f4eafa61..cad738ef7 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/cervical_exam_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/cervical_exam_sub_form.json @@ -8,6 +8,7 @@ "type": "label", "label_text_style": "bold", "text": "{{cervical_exam_sub_form.step1.dilation_cm_label.text}}", + "translation_text": "cervical_exam_sub_form.step1.dilation_cm_label.text", "text_color": "#000000", "v_required": { "value": false @@ -23,15 +24,15 @@ "edit_type": "number", "v_numeric_integer": { "value": "true", - "err": "Enter valid cervical dilation in cm" + "err": "{{cervical_exam_sub_form.step1.dilation_cm.v_numeric_integer.err}}" }, "v_min": { "value": "0", - "err": "Cervical dilation must be greater than or equal to 0" + "err": "{{cervical_exam_sub_form.step1.dilation_cm.v_min.err}}" }, "v_max": { "value": "10", - "err": "Cervical dilation must be equal to or less than 10" + "err": "{{cervical_exam_sub_form.step1.dilation_cm.v_max.err}}" }, "v_required": { "value": false, diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/fetal_heartbeat_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/fetal_heartbeat_sub_form.json index ccee0eff8..cb93f8576 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/fetal_heartbeat_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/fetal_heartbeat_sub_form.json @@ -5,6 +5,7 @@ "type": "label", "label_text_style": "bold", "text": "{{fetal_heartbeat_sub_form.step1.fetal_heart_rate_label.text}}", + "translation_text": "fetal_heartbeat_sub_form.step1.fetal_heart_rate_label.text", "text_color": "#000000", "v_required": { "value": false @@ -24,15 +25,15 @@ }, "v_min": { "value": "80", - "err": "Fetal heartbeat must be equal or greater than 80" + "err": "{{fetal_heartbeat_sub_form.step1.fetal_heart_rate.v_min.err}}" }, "v_max": { "value": "200", - "err": "Fetal heartbeat must be less than or equal to 200" + "err": "{{fetal_heartbeat_sub_form.step1.fetal_heart_rate.v_max.err}}" }, "v_numeric_integer": { "value": "true", - "err": "Enter a valid sfh" + "err": "{{fetal_heartbeat_sub_form.step1.fetal_heart_rate.v_numeric_integer.err}}" } } ], diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/oedema_present_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/oedema_present_sub_form.json index 6b1a9f605..715383dcd 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/oedema_present_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/oedema_present_sub_form.json @@ -13,6 +13,7 @@ { "key": "ankle_oedema", "text": "{{oedema_present_sub_form.step1.oedema_type.options.ankle_oedema.text}}", + "translation_text": "oedema_present_sub_form.step1.oedema_type.options.ankle_oedema.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "155113AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -21,6 +22,7 @@ { "key": "hands_feet_oedema", "text": "{{oedema_present_sub_form.step1.oedema_type.options.hands_feet_oedema.text}}", + "translation_text": "oedema_present_sub_form.step1.oedema_type.options.hands_feet_oedema.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165375AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -29,6 +31,7 @@ { "key": "lower_back_oedema", "text": "{{oedema_present_sub_form.step1.oedema_type.options.lower_back_oedema.text}}", + "translation_text": "oedema_present_sub_form.step1.oedema_type.options.lower_back_oedema.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165291AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -37,6 +40,7 @@ { "key": "leg_swelling", "text": "{{oedema_present_sub_form.step1.oedema_type.options.leg_swelling.text}}", + "translation_text": "oedema_present_sub_form.step1.oedema_type.options.leg_swelling.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "141478AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/pelvic_exam_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/pelvic_exam_sub_form.json index b24cbf1d0..cc119fe2c 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/pelvic_exam_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/pelvic_exam_sub_form.json @@ -13,6 +13,7 @@ { "key": "abnormal_vaginal_discharge", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.abnormal_vaginal_discharge.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.abnormal_vaginal_discharge.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "123395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -21,6 +22,7 @@ { "key": "amniotic_fluid_evidence", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.amniotic_fluid_evidence.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.amniotic_fluid_evidence.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "148968AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -29,6 +31,7 @@ { "key": "smelling_vaginal_discharge", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.smelling_vaginal_discharge.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.smelling_vaginal_discharge.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165162AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -37,6 +40,7 @@ { "key": "erythematous_papules", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.erythematous_papules.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.erythematous_papules.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -45,6 +49,7 @@ { "key": "vesicles", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.vesicles.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.vesicles.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "133798AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -53,6 +58,7 @@ { "key": "genital_ulcer", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.genital_ulcer.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.genital_ulcer.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "153872AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -61,6 +67,7 @@ { "key": "genital_pain", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.genital_pain.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.genital_pain.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "123385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -69,6 +76,7 @@ { "key": "femoral_lymphadenopathy", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.femoral_lymphadenopathy.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.femoral_lymphadenopathy.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "", @@ -77,6 +85,7 @@ { "key": "cervical_friability", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.cervical_friability.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.cervical_friability.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165288AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -85,6 +94,7 @@ { "key": "mucopurulent_ervicitis", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.mucopurulent_ervicitis.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.mucopurulent_ervicitis.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165371AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -93,6 +103,7 @@ { "key": "vaginal_discharge_curd_like", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.vaginal_discharge_curd_like.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.vaginal_discharge_curd_like.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "165290AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -101,6 +112,7 @@ { "key": "other", "text": "{{pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.other.text}}", + "translation_text": "pelvic_exam_sub_form.step1.pelvic_exam_abnormal.options.other.text", "value": false, "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", @@ -115,6 +127,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{pelvic_exam_sub_form.step1.evaluate_labour_toaster.text}}", + "translation_text": "pelvic_exam_sub_form.step1.evaluate_labour_toaster.text", "text_color": "#E20000", "toaster_type": "problem", "relevance": { diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/respiratory_exam_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/respiratory_exam_sub_form.json index 5030b79ae..40ab0a03e 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/respiratory_exam_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/respiratory_exam_sub_form.json @@ -13,6 +13,7 @@ { "key": "dyspnoea", "text": "{{respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.dyspnoea.text}}", + "translation_text": "respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.dyspnoea.text", "value": false, "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", @@ -21,6 +22,7 @@ { "key": "cough", "text": "{{respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.cough.text}}", + "translation_text": "respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.cough.text", "value": false, "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", @@ -29,6 +31,7 @@ { "key": "rapid_breathing", "text": "{{respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.rapid_breathing.text}}", + "translation_text": "respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.rapid_breathing.text", "value": false, "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", @@ -37,6 +40,7 @@ { "key": "slow_breathing", "text": "{{respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.slow_breathing.text}}", + "translation_text": "respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.slow_breathing.text", "value": false, "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", @@ -45,6 +49,7 @@ { "key": "wheezing", "text": "{{respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.wheezing.text}}", + "translation_text": "respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.wheezing.text", "value": false, "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", @@ -53,6 +58,7 @@ { "key": "rales", "text": "{{respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.rales.text}}", + "translation_text": "respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.rales.text", "value": false, "openmrs_entity_parent": "165367AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", @@ -61,6 +67,7 @@ { "key": "other", "text": "{{respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.other.text}}", + "translation_text": "respiratory_exam_sub_form.step1.respiratory_exam_abnormal.options.other.text", "value": false, "openmrs_entity_parent": "1123AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_glucose_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_glucose_sub_form.json index d1d948135..a3da88100 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_glucose_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_glucose_sub_form.json @@ -1,395 +1,402 @@ { - "content_form": [ - { - "key": "glucose_test_status", - "openmrs_entity_parent": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "163725AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "label": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "type": "extended_radio_button", - "options": [ - { - "key": "done_today", - "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.options.done_today.text}}", - "type": "done_today", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "done_earlier", - "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.options.done_earlier.text}}", - "type": "done_earlier", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "ordered", - "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.options.ordered.text}}", - "type": "ordered", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.options.not_done.text}}", - "type": "not_done", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.v_required.err}}" - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10dp" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "glucose_test_date_today_hidden", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - } - }, - { - "key": "glucose_test_date", - "openmrs_entity_parent": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "163724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{tests_blood_glucose_sub_form.step1.glucose_test_date.hint}}", - "expanded": "false", - "max_date": "today", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.glucose_test_date.v_required.err}}" - } - }, - { - "key": "glucose_test_type", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165394AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "fasting_plasma", - "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.options.fasting_plasma.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "ogtt_75", - "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.options.ogtt_75.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "random_plasma", - "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.options.random_plasma.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.v_required.err}}" - } - }, - { - "key": "fasting_plasma_gluc", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.hint}}", - "edit_type": "number", - "v_min": { - "value": "30", - "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_min.err}}" - }, - "v_max": { - "value": "500", - "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_max.err}}" - }, - "v_numeric": { - "value": "true", - "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_numeric.err}}" - }, - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "ogtt_fasting", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.hint}}", - "edit_type": "number", - "v_min": { - "value": "30", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_min.err}}" - }, - "v_max": { - "value": "500", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_max.err}}" - }, - "v_numeric": { - "value": "true", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_numeric.err}}" - }, - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "ogtt_1", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163704AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{tests_blood_glucose_sub_form.step1.ogtt_1.hint}}", - "edit_type": "number", - "v_min": { - "value": "30", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_min.err}}" - }, - "v_max": { - "value": "500", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_max.err}}" - }, - "v_numeric": { - "value": "true", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_numeric.err}}" - }, - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "ogtt_2", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163705AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{tests_blood_glucose_sub_form.step1.ogtt_2.hint}}", - "edit_type": "number", - "v_min": { - "value": "30", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_min.err}}" - }, - "v_max": { - "value": "500", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_max.err}}" - }, - "v_numeric": { - "value": "true", - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_numeric.err}}" - }, - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "random_plasma", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{tests_blood_glucose_sub_form.step1.random_plasma.hint}}", - "edit_type": "number", - "v_min": { - "value": "30", - "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_min.err}}" - }, - "v_max": { - "value": "500", - "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_max.err}}" - }, - "v_numeric": { - "value": "true", - "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_numeric.err}}" - }, - "v_required": { - "value": true, - "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "117807AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "gdm", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "119477AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "dm_in_preg", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - } - }, - { - "key": "gestational_diabetes_danger_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_blood_glucose_sub_form.step1.gestational_diabetes_danger_toaster.text}}", - "toaster_info_text": "{{tests_blood_glucose_sub_form.step1.gestational_diabetes_danger_toaster.toaster_info_text}}", - "toaster_info_title": "{{tests_blood_glucose_sub_form.step1.gestational_diabetes_danger_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "diabetes_mellitus_danger_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_blood_glucose_sub_form.step1.diabetes_mellitus_danger_toaster.text}}", - "toaster_info_text": "{{tests_blood_glucose_sub_form.step1.diabetes_mellitus_danger_toaster.toaster_info_text}}", - "toaster_info_title": "{{tests_blood_glucose_sub_form.step1.diabetes_mellitus_danger_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "dietary_intervention_danger_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_blood_glucose_sub_form.step1.dietary_intervention_danger_toaster.text}}", - "toaster_info_text": "{{tests_blood_glucose_sub_form.step1.dietary_intervention_danger_toaster.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - } - ], - "count": 1, - "validate_on_submit": true, - "properties_file_name": "tests_blood_glucose_sub_form" + "content_form": [ + { + "key": "glucose_test_status", + "openmrs_entity_parent": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "163725AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "type": "extended_radio_button", + "options": [ + { + "key": "done_today", + "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.done_today.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.glucose_test_status.done_today.text", + "type": "done_today", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "done_earlier", + "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.done_earlier.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.glucose_test_status.done_earlier.text", + "type": "done_earlier", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "ordered", + "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.ordered.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.glucose_test_status.ordered.text", + "type": "ordered", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_status.not_done.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.glucose_test_status.not_done.text", + "type": "not_done", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10dp" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "glucose_test_date_today_hidden", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_calculation_rules.yml" + } + } + } + }, + { + "key": "glucose_test_date", + "openmrs_entity_parent": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "163724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "date_picker", + "hint": "{{tests_blood_glucose_sub_form.step1.glucose_test_date.hint}}", + "expanded": "false", + "max_date": "today", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_calculation_rules.yml" + } + } + }, + "v_required": { + "value": true, + "err": "{{tests_blood_glucose_sub_form.step1.glucose_test_date.v_required.err}}" + } + }, + { + "key": "glucose_test_type", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165394AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "fasting_plasma", + "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.options.fasting_plasma.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.glucose_test_type.options.fasting_plasma.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "ogtt_75", + "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.options.ogtt_75.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.glucose_test_type.options.ogtt_75.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "163594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "random_plasma", + "text": "{{tests_blood_glucose_sub_form.step1.glucose_test_type.options.random_plasma.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.glucose_test_type.options.random_plasma.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + }, + "v_required": { + "value": true + } + }, + { + "key": "fasting_plasma_gluc", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.hint}}", + "edit_type": "number", + "v_min": { + "value": "30", + "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_min.err}}" + }, + "v_max": { + "value": "500", + "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_max.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_numeric.err}}" + }, + "v_required": { + "value": true, + "err": "{{tests_blood_glucose_sub_form.step1.fasting_plasma_gluc.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + }, + { + "key": "ogtt_fasting", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "163594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.hint}}", + "edit_type": "number", + "v_min": { + "value": "30", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_min.err}}" + }, + "v_max": { + "value": "500", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_max.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_numeric.err}}" + }, + "v_required": { + "value": true, + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_fasting.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + }, + { + "key": "ogtt_1", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "163704AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{tests_blood_glucose_sub_form.step1.ogtt_1.hint}}", + "edit_type": "number", + "v_min": { + "value": "30", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_min.err}}" + }, + "v_max": { + "value": "500", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_max.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_numeric.err}}" + }, + "v_required": { + "value": true, + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_1.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + }, + { + "key": "ogtt_2", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "163705AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{tests_blood_glucose_sub_form.step1.ogtt_2.hint}}", + "edit_type": "number", + "v_min": { + "value": "30", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_min.err}}" + }, + "v_max": { + "value": "500", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_max.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_numeric.err}}" + }, + "v_required": { + "value": true, + "err": "{{tests_blood_glucose_sub_form.step1.ogtt_2.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + }, + { + "key": "random_plasma", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{tests_blood_glucose_sub_form.step1.random_plasma.hint}}", + "edit_type": "number", + "v_min": { + "value": "30", + "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_min.err}}" + }, + "v_max": { + "value": "500", + "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_max.err}}" + }, + "v_numeric": { + "value": "true", + "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_numeric.err}}" + }, + "v_required": { + "value": true, + "err": "{{tests_blood_glucose_sub_form.step1.random_plasma.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "117807AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "gdm", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_calculation_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "119477AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "dm_in_preg", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_calculation_rules.yml" + } + } + } + }, + { + "key": "gestational_diabetes_danger_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{tests_blood_glucose_sub_form.step1.gestational_diabetes_danger_toaster.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.gestational_diabetes_danger_toaster.text", + "toaster_info_text": "{{tests_blood_glucose_sub_form.step1.gestational_diabetes_danger_toaster.toaster_info_text}}", + "toaster_info_title": "{{tests_blood_glucose_sub_form.step1.gestational_diabetes_danger_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + }, + { + "key": "diabetes_mellitus_danger_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{tests_blood_glucose_sub_form.step1.diabetes_mellitus_danger_toaster.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.diabetes_mellitus_danger_toaster.text", + "toaster_info_text": "{{tests_blood_glucose_sub_form.step1.diabetes_mellitus_danger_toaster.toaster_info_text}}", + "toaster_info_title": "{{tests_blood_glucose_sub_form.step1.diabetes_mellitus_danger_toaster.toaster_info_title}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + }, + { + "key": "dietary_intervention_danger_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{tests_blood_glucose_sub_form.step1.dietary_intervention_danger_toaster.text}}", + "translation_text": "tests_blood_glucose_sub_form.step1.dietary_intervention_danger_toaster.text", + "toaster_info_text": "{{tests_blood_glucose_sub_form.step1.dietary_intervention_danger_toaster.toaster_info_text}}", + "toaster_type": "problem", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "tests_relevance_rules.yml" + } + } + } + } + ], + "count": 1, + "properties_file_name": "tests_blood_glucose_sub_form" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_haemoglobin_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_haemoglobin_sub_form.json index 4f1c8d669..84cb22650 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_haemoglobin_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_haemoglobin_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.options.done_today.text}}", + "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.done_today.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.options.done_earlier.text}}", + "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.done_earlier.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -28,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.options.ordered.text}}", + "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.ordered.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -36,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.options.not_done.text}}", + "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_status.not_done.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -67,6 +71,7 @@ { "key": "no_supplies", "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_notdone.options.no_supplies.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_notdone.options.no_supplies.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165183AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -74,6 +79,7 @@ { "key": "expired", "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_notdone.options.expired.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_notdone.options.expired.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -81,6 +87,7 @@ { "key": "other", "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_notdone.options.other.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_notdone.options.other.text", "openmrs_entity_parent": "21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -176,6 +183,7 @@ { "key": "complete_blood_count", "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_type.options.complete_blood_count.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_type.options.complete_blood_count.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1019AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -183,6 +191,7 @@ { "key": "hb_test_haemoglobinometer", "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_type.options.hb_test_haemoglobinometer.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_type.options.hb_test_haemoglobinometer.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165395AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -190,6 +199,7 @@ { "key": "hb_test_colour_scale", "text": "{{tests_blood_haemoglobin_sub_form.step1.hb_test_type.options.hb_test_colour_scale.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hb_test_type.options.hb_test_colour_scale.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165396AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -339,6 +349,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_blood_haemoglobin_sub_form.step1.anaemia_diagnosis_danger_toaster.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.anaemia_diagnosis_danger_toaster.text", "toaster_info_text": "{{tests_blood_haemoglobin_sub_form.step1.anaemia_diagnosis_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_blood_haemoglobin_sub_form.step1.anaemia_diagnosis_danger_toaster.toaster_info_title}}", "toaster_type": "problem", @@ -381,6 +392,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_blood_haemoglobin_sub_form.step1.hematocrit_danger_toaster.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.hematocrit_danger_toaster.text", "toaster_info_text": "{{tests_blood_haemoglobin_sub_form.step1.hematocrit_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_blood_haemoglobin_sub_form.step1.hematocrit_danger_toaster.toaster_info_title}}", "toaster_type": "problem", @@ -424,6 +436,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_blood_haemoglobin_sub_form.step1.wbc_danger_toaster.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.wbc_danger_toaster.text", "toaster_info_text": "{{tests_blood_haemoglobin_sub_form.step1.wbc_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_blood_haemoglobin_sub_form.step1.wbc_danger_toaster.toaster_info_title}}", "toaster_type": "problem", @@ -467,6 +480,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_blood_haemoglobin_sub_form.step1.paltelets_danger_toaster.text}}", + "translation_text": "tests_blood_haemoglobin_sub_form.step1.paltelets_danger_toaster.text", "toaster_info_text": "{{tests_blood_haemoglobin_sub_form.step1.paltelets_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_blood_haemoglobin_sub_form.step1.paltelets_danger_toaster.toaster_info_title}}", "toaster_type": "problem", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_type_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_type_sub_form.json index 9459494c0..a75acf3ff 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_type_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_blood_type_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.options.done_today.text}}", + "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.done_today.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type_test_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.options.done_earlier.text}}", + "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.done_earlier.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type_test_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -28,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.options.ordered.text}}", + "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.ordered.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type_test_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -36,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.options.not_done.text}}", + "text": "{{tests_blood_type_sub_form.step1.blood_type_test_status.not_done.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type_test_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -112,6 +116,7 @@ { "key": "a", "text": "{{tests_blood_type_sub_form.step1.blood_type.options.a.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type.options.a.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -119,6 +124,7 @@ { "key": "b", "text": "{{tests_blood_type_sub_form.step1.blood_type.options.b.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type.options.b.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "163116AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -126,6 +132,7 @@ { "key": "ab", "text": "{{tests_blood_type_sub_form.step1.blood_type.options.ab.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type.options.ab.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "163117AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -133,6 +140,7 @@ { "key": "o", "text": "{{tests_blood_type_sub_form.step1.blood_type.options.o.text}}", + "translation_text": "tests_blood_type_sub_form.step1.blood_type.options.o.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "163118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -162,6 +170,7 @@ { "key": "positive", "text": "{{tests_blood_type_sub_form.step1.rh_factor.options.positive.text}}", + "translation_text": "tests_blood_type_sub_form.step1.rh_factor.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -169,6 +178,7 @@ { "key": "negative", "text": "{{tests_blood_type_sub_form.step1.rh_factor.options.negative.text}}", + "translation_text": "tests_blood_type_sub_form.step1.rh_factor.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -193,6 +203,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_blood_type_sub_form.step1.rh_factor_toaster.text}}", + "translation_text": "tests_blood_type_sub_form.step1.rh_factor_toaster.text", "toaster_info_text": "{{tests_blood_type_sub_form.step1.rh_factor_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_blood_type_sub_form.step1.rh_factor_toaster.toaster_info_title}}", "toaster_type": "warning", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_covid_19_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_covid_19_sub_form.json deleted file mode 100644 index 704ebad16..000000000 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_covid_19_sub_form.json +++ /dev/null @@ -1,316 +0,0 @@ -{ - "content_form": [ - { - "key": "covid_status", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163725AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "label": "{{tests_covid_sub_form.step1.covid_status.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "type": "extended_radio_button", - "options": [ - { - "key": "done_today", - "text": "{{tests_covid_sub_form.step1.covid_test_status.options.done_today.text}}", - "type": "done_today", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "done_earlier", - "text": "{{tests_covid_sub_form.step1.covid_test_status.options.done_earlier.text}}", - "type": "done_earlier", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "ordered", - "text": "{{tests_covid_sub_form.step1.covid_test_status.options.ordered.text}}", - "type": "ordered", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{tests_covid_sub_form.step1.covid_test_status.options.not_done.text}}", - "type": "not_done", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{tests_covid_sub_form.step1.covid_test_status.v_required.err}}" - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10dp" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "covid_date_today_hidden", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - } - }, - { - "key": "covid_test_date", - "openmrs_entity_parent": "300AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "163724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{tests_covid_sub_form.step1.covid_test_date.hint}}", - "expanded": "false", - "max_date": "today", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{tests_covid_sub_form.step1.covid_test_date.v_required.err}}" - } - }, - { - "key": "covid_test_type", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "type": "native_radio", - "label": "{{tests_covid_sub_form.step1.covid_test_type.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "covid_pcr_test", - "text": "{{tests_covid_sub_form.step1.covid_test_rtpcr.label.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163126AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "covid_antigen_test", - "text": "{{tests_covid_sub_form.step1.covid_test_antigen.label.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163126AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "covid_igg_test", - "text": "{{tests_covid_sub_form.step1.covid_test_igg.label.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163126AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "covid_igm_test", - "text": "{{tests_covid_sub_form.step1.covid_test_igmr.label.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163126AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{tests_covid_sub_form.step1.covid_test_type.v_required.err}}" - } - }, - { - "key": "covid_pcr_test", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_covid_sub_form.step1.covid_test_rtpcr.label.text}}", - "label_text_style": "bold", - "options": [ - { - "key": "positive", - "text": "{{tests_covid_sub_form.step1.covid.options.positive.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "negative", - "text": "{{tests_covid_sub_form.step1.covid.options.negative.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "covid_antigen_test", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_covid_sub_form.step1.covid_test_antigen.label.text}}", - "label_text_style": "bold", - "options": [ - { - "key": "positive", - "text": "{{tests_covid_sub_form.step1.covid.options.positive.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "negative", - "text": "{{tests_covid_sub_form.step1.covid.options.negative.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "covid_igg_test", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_covid_sub_form.step1.covid_test_igg.label.text}}", - "label_text_style": "bold", - "options": [ - { - "key": "positive", - "text": "{{tests_covid_sub_form.step1.covid.options.positive.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "negative", - "text": "{{tests_covid_sub_form.step1.covid.options.negative.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "covid_igm_test", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_covid_sub_form.step1.covid_test_igmr.label.text}}", - "label_text_style": "bold", - "options": [ - { - "key": "positive", - "text": "{{tests_covid_sub_form.step1.covid.options.positive.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "negative", - "text": "{{tests_covid_sub_form.step1.covid.options.negative.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "", - "key": "covid_positive", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - } - } - ], - "count": 1, - "properties_file_name": "test_covid_sub_form" -} \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_b_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_b_sub_form.json index aefbbc36b..493649e0d 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_b_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_b_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.options.done_today.text}}", + "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.done_today.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.options.done_earlier.text}}", + "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.done_earlier.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -28,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.options.ordered.text}}", + "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.ordered.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -36,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.options.not_done.text}}", + "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_status.not_done.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -68,6 +72,7 @@ { "key": "stock_out", "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_notdone.options.stock_out.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_notdone.options.stock_out.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165183AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -75,6 +80,7 @@ { "key": "expired_stock", "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_notdone.options.expired_stock.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_notdone.options.expired_stock.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -82,6 +88,7 @@ { "key": "other", "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_notdone.options.other.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_notdone.options.other.text", "openmrs_entity_parent": "161475AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -171,6 +178,7 @@ { "key": "hbsag_lab_based", "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_type.options.hbsag_lab_based.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_type.options.hbsag_lab_based.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "159430AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -178,6 +186,7 @@ { "key": "hbsag_rdt", "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_type.options.hbsag_rdt.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_type.options.hbsag_rdt.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165301AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -185,6 +194,7 @@ { "key": "hbsag_dbs", "text": "{{tests_hepatitis_b_sub_form.step1.hepb_test_type.options.hbsag_dbs.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepb_test_type.options.hbsag_dbs.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "161472AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -214,6 +224,7 @@ { "key": "positive", "text": "{{tests_hepatitis_b_sub_form.step1.hbsag_lab_ima.options.positive.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hbsag_lab_ima.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -221,6 +232,7 @@ { "key": "negative", "text": "{{tests_hepatitis_b_sub_form.step1.hbsag_lab_ima.options.negative.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hbsag_lab_ima.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -250,6 +262,7 @@ { "key": "positive", "text": "{{tests_hepatitis_b_sub_form.step1.hbsag_rdt.options.positive.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hbsag_rdt.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -257,6 +270,7 @@ { "key": "negative", "text": "{{tests_hepatitis_b_sub_form.step1.hbsag_rdt.options.negative.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hbsag_rdt.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -286,6 +300,7 @@ { "key": "positive", "text": "{{tests_hepatitis_b_sub_form.step1.hbsag_dbs.options.positive.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hbsag_dbs.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -293,6 +308,7 @@ { "key": "negative", "text": "{{tests_hepatitis_b_sub_form.step1.hbsag_dbs.options.negative.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hbsag_dbs.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -333,6 +349,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_hepatitis_b_sub_form.step1.hepatitis_b_danger_toaster.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepatitis_b_danger_toaster.text", "toaster_info_text": "{{tests_hepatitis_b_sub_form.step1.hepatitis_b_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_hepatitis_b_sub_form.step1.hepatitis_b_danger_toaster.toaster_info_title}}", "toaster_type": "problem", @@ -351,6 +368,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_hepatitis_b_sub_form.step1.hepatitis_b_info_toaster.text}}", + "translation_text": "tests_hepatitis_b_sub_form.step1.hepatitis_b_info_toaster.text", "toaster_type": "info", "relevance": { "rules-engine": { diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_c_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_c_sub_form.json index ac99449d3..a415328b6 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_c_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_hepatitis_c_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.options.done_today.text}}", + "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.done_today.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.options.done_earlier.text}}", + "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.done_earlier.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -28,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.options.ordered.text}}", + "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.ordered.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -36,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.options.not_done.text}}", + "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_status.not_done.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -67,6 +71,7 @@ { "key": "stock_out", "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_notdone.options.stock_out.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_notdone.options.stock_out.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165183AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -74,6 +79,7 @@ { "key": "expired_stock", "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_notdone.options.expired_stock.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_notdone.options.expired_stock.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -81,6 +87,7 @@ { "key": "other", "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_notdone.options.other.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_notdone.options.other.text", "openmrs_entity_parent": "161474AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -171,6 +178,7 @@ { "key": "anti_hcv_lab_based", "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_type.options.anti_hcv_lab_based.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_type.options.anti_hcv_lab_based.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1325AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -178,6 +186,7 @@ { "key": "anti_hcv_rdt", "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_type.options.anti_hcv_rdt.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_type.options.anti_hcv_rdt.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165302AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -185,6 +194,7 @@ { "key": "anti_hcv_dbs", "text": "{{tests_hepatitis_c_sub_form.step1.hepc_test_type.options.anti_hcv_dbs.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepc_test_type.options.anti_hcv_dbs.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "161471AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -213,6 +223,7 @@ { "key": "positive", "text": "{{tests_hepatitis_c_sub_form.step1.hcv_lab_ima.options.positive.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hcv_lab_ima.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -220,6 +231,7 @@ { "key": "negative", "text": "{{tests_hepatitis_c_sub_form.step1.hcv_lab_ima.options.negative.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hcv_lab_ima.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -248,6 +260,7 @@ { "key": "positive", "text": "{{tests_hepatitis_c_sub_form.step1.hcv_rdt.options.positive.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hcv_rdt.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -255,6 +268,7 @@ { "key": "negative", "text": "{{tests_hepatitis_c_sub_form.step1.hcv_rdt.options.negative.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hcv_rdt.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -283,6 +297,7 @@ { "key": "positive", "text": "{{tests_hepatitis_c_sub_form.step1.hcv_dbs.options.positive.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hcv_dbs.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -290,6 +305,7 @@ { "key": "negative", "text": "{{tests_hepatitis_c_sub_form.step1.hcv_dbs.options.negative.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hcv_dbs.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -329,6 +345,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_hepatitis_c_sub_form.step1.hepatitis_c_danger_toaster.text}}", + "translation_text": "tests_hepatitis_c_sub_form.step1.hepatitis_c_danger_toaster.text", "toaster_info_text": "{{tests_hepatitis_c_sub_form.step1.hepatitis_c_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_hepatitis_c_sub_form.step1.hepatitis_c_danger_toaster.toaster_info_title}}", "toaster_type": "problem", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_hiv_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_hiv_sub_form.json index 6080f020c..461fe027d 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_hiv_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_hiv_sub_form.json @@ -13,7 +13,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_hiv_sub_form.step1.hiv_test_status.options.done_today.text}}", + "text": "{{tests_hiv_sub_form.step1.hiv_test_status.done_today.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -21,7 +22,8 @@ }, { "key": "done_earlier", - "text": "{{tests_hiv_sub_form.step1.hiv_test_status.options.done_earlier.text}}", + "text": "{{tests_hiv_sub_form.step1.hiv_test_status.done_earlier.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -29,7 +31,8 @@ }, { "key": "ordered", - "text": "{{tests_hiv_sub_form.step1.hiv_test_status.options.ordered.text}}", + "text": "{{tests_hiv_sub_form.step1.hiv_test_status.ordered.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -37,7 +40,8 @@ }, { "key": "not_done", - "text": "{{tests_hiv_sub_form.step1.hiv_test_status.options.not_done.text}}", + "text": "{{tests_hiv_sub_form.step1.hiv_test_status.not_done.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -69,6 +73,7 @@ { "key": "stock_out", "text": "{{tests_hiv_sub_form.step1.hiv_test_notdone.options.stock_out.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_notdone.options.stock_out.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165183AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -76,6 +81,7 @@ { "key": "expired_stock", "text": "{{tests_hiv_sub_form.step1.hiv_test_notdone.options.expired_stock.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_notdone.options.expired_stock.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -83,6 +89,7 @@ { "key": "other", "text": "{{tests_hiv_sub_form.step1.hiv_test_notdone.options.other.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_notdone.options.other.text", "openmrs_entity_parent": "165300AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -172,6 +179,7 @@ { "key": "positive", "text": "{{tests_hiv_sub_form.step1.hiv_test_result.options.positive.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_result.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -179,6 +187,7 @@ { "key": "negative", "text": "{{tests_hiv_sub_form.step1.hiv_test_result.options.negative.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_result.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -186,6 +195,7 @@ { "key": "inconclusive", "text": "{{tests_hiv_sub_form.step1.hiv_test_result.options.inconclusive.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_test_result.options.inconclusive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -226,6 +236,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_hiv_sub_form.step1.hiv_inconclusive_toaster.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_inconclusive_toaster.text", "toaster_type": "warning", "relevance": { "rules-engine": { @@ -242,6 +253,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_hiv_sub_form.step1.hiv_positive_toaster.text}}", + "translation_text": "tests_hiv_sub_form.step1.hiv_positive_toaster.text", "toaster_info_text": "{{tests_hiv_sub_form.step1.hiv_positive_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_hiv_sub_form.step1.hiv_positive_toaster.toaster_info_title}}", "toaster_type": "problem", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_other_tests_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_other_tests_sub_form.json index 8e1cedbf4..f29e0d2f0 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_other_tests_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_other_tests_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_other_tests_sub_form.step1.other_test.options.done_today.text}}", + "text": "{{tests_other_tests_sub_form.step1.other_test.done_today.text}}", + "translation_text": "tests_other_tests_sub_form.step1.other_test.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_other_tests_sub_form.step1.other_test.options.done_earlier.text}}", + "text": "{{tests_other_tests_sub_form.step1.other_test.done_earlier.text}}", + "translation_text": "tests_other_tests_sub_form.step1.other_test.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_partner_hiv_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_partner_hiv_sub_form.json index 78cf51c9c..b6f6f376a 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_partner_hiv_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_partner_hiv_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.options.done_today.text}}", + "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.done_today.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_test_partner_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.options.done_earlier.text}}", + "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.done_earlier.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_test_partner_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -28,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.options.ordered.text}}", + "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.ordered.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_test_partner_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -36,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.options.not_done.text}}", + "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_status.not_done.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_test_partner_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -111,6 +115,7 @@ { "key": "positive", "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_result.options.positive.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_test_partner_result.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -118,6 +123,7 @@ { "key": "negative", "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_result.options.negative.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_test_partner_result.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -125,6 +131,7 @@ { "key": "inconclusive", "text": "{{tests_partner_hiv_sub_form.step1.hiv_test_partner_result.options.inconclusive.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_test_partner_result.options.inconclusive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -163,6 +170,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_partner_hiv_sub_form.step1.partner_hiv_positive_toaster.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.partner_hiv_positive_toaster.text", "toaster_type": "warning", "relevance": { "step2:hiv_test_partner_result": { @@ -192,6 +200,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_partner_hiv_sub_form.step1.hiv_risk_toaster.text}}", + "translation_text": "tests_partner_hiv_sub_form.step1.hiv_risk_toaster.text", "toaster_info_text": "{{tests_partner_hiv_sub_form.step1.hiv_risk_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_partner_hiv_sub_form.step1.hiv_risk_toaster.toaster_info_title}}", "toaster_type": "problem", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_syphilis_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_syphilis_sub_form.json index af168e581..3e7d14442 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_syphilis_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_syphilis_sub_form.json @@ -1,22 +1,4 @@ -{"global_previous": [ - "blood_type_test_status", - "hiv_test_partner_result", - "hiv_test_status", - "hiv_test_result", - "hiv_test_partner_status", - "hepb_test_status", - "hepc_test_status", - "syph_test_status", - "tb_screening_status", - "hiv_positive", - "urine_test_status", - "hb_test_status", - "syphilis_positive", - "hepc_positive", - "syph_test_status", - "ultrasound", - "hepb_positive" -], +{ "content_form": [ { "key": "syph_test_status", @@ -30,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_syphilis_sub_form.step1.syph_test_status.options.done_today.text}}", + "text": "{{tests_syphilis_sub_form.step1.syph_test_status.done_today.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -38,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_syphilis_sub_form.step1.syph_test_status.options.done_earlier.text}}", + "text": "{{tests_syphilis_sub_form.step1.syph_test_status.done_earlier.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -46,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_syphilis_sub_form.step1.syph_test_status.options.ordered.text}}", + "text": "{{tests_syphilis_sub_form.step1.syph_test_status.ordered.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -54,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_syphilis_sub_form.step1.syph_test_status.options.not_done.text}}", + "text": "{{tests_syphilis_sub_form.step1.syph_test_status.not_done.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -62,8 +48,7 @@ } ], "v_required": { - "value": true, - "err": "{{tests_syphilis_sub_form.step1.syph_test_status.v_required.err}}" + "value": true } }, { @@ -81,6 +66,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_syphilis_sub_form.step1.syphilis_greater_5_toaster.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syphilis_greater_5_toaster.text", "toaster_info_text": "{{tests_syphilis_sub_form.step1.syphilis_greater_5_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_syphilis_sub_form.step1.syphilis_greater_5_toaster.toaster_info_title}}", "toaster_type": "info", @@ -99,6 +85,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_syphilis_sub_form.step1.syphilis_below_5_toaster.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syphilis_below_5_toaster.text", "toaster_info_text": "{{tests_syphilis_sub_form.step1.syphilis_below_5_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_syphilis_sub_form.step1.syphilis_below_5_toaster.toaster_info_title}}", "toaster_type": "info", @@ -122,6 +109,7 @@ { "key": "stock_out", "text": "{{tests_syphilis_sub_form.step1.syph_test_notdone.options.stock_out.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_notdone.options.stock_out.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165183AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -129,6 +117,7 @@ { "key": "expired_stock", "text": "{{tests_syphilis_sub_form.step1.syph_test_notdone.options.expired_stock.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_notdone.options.expired_stock.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -136,6 +125,7 @@ { "key": "other", "text": "{{tests_syphilis_sub_form.step1.syph_test_notdone.options.other.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_notdone.options.other.text", "openmrs_entity_parent": "161476AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -149,8 +139,7 @@ } }, "v_required": { - "value": true, - "err": "{{tests_syphilis_sub_form.step1.syph_test_notdone.v_required.err}}" + "value": true } }, { @@ -218,13 +207,14 @@ "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "check_box", + "type": "native_radio", "label": "{{tests_syphilis_sub_form.step1.syph_test_type.label}}", "label_text_style": "bold", "options": [ { "key": "rapid_syphilis", "text": "{{tests_syphilis_sub_form.step1.syph_test_type.options.rapid_syphilis.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_type.options.rapid_syphilis.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165303AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -232,6 +222,7 @@ { "key": "rapid_plasma", "text": "{{tests_syphilis_sub_form.step1.syph_test_type.options.rapid_plasma.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_type.options.rapid_plasma.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1619AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -239,6 +230,7 @@ { "key": "off_site_lab", "text": "{{tests_syphilis_sub_form.step1.syph_test_type.options.off_site_lab.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syph_test_type.options.off_site_lab.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165389AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -252,15 +244,14 @@ } }, "v_required": { - "value": true, - "err": "{{tests_syphilis_sub_form.step1.syph_test_type.v_required.err}}" + "value": true } }, { "key": "rapid_syphilis_test", "openmrs_entity_parent": "", "openmrs_entity": "concept", - "openmrs_entity_id": "165303AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity_id": "rapid_syphilis_test", "type": "native_radio", "label": "{{tests_syphilis_sub_form.step1.rapid_syphilis_test.label}}", "label_text_style": "bold", @@ -268,21 +259,22 @@ { "key": "positive", "text": "{{tests_syphilis_sub_form.step1.rapid_syphilis_test.options.positive.text}}", + "translation_text": "tests_syphilis_sub_form.step1.rapid_syphilis_test.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", - "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "openmrs_entity_id": "rapid_syphilis_test_positive" }, { "key": "negative", "text": "{{tests_syphilis_sub_form.step1.rapid_syphilis_test.options.negative.text}}", + "translation_text": "tests_syphilis_sub_form.step1.rapid_syphilis_test.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", - "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "openmrs_entity_id": "rapid_syphilis_test_negative" } ], "v_required": { - "value": true, - "err": "{{tests_syphilis_sub_form.step1.rapid_syphilis_test.v_required.err}}" + "value": true }, "relevance": { "rules-engine": { @@ -304,6 +296,7 @@ { "key": "positive", "text": "{{tests_syphilis_sub_form.step1.rpr_syphilis_test.options.positive.text}}", + "translation_text": "tests_syphilis_sub_form.step1.rpr_syphilis_test.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -311,14 +304,14 @@ { "key": "negative", "text": "{{tests_syphilis_sub_form.step1.rpr_syphilis_test.options.negative.text}}", + "translation_text": "tests_syphilis_sub_form.step1.rpr_syphilis_test.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" } ], "v_required": { - "value": true, - "err": "{{tests_syphilis_sub_form.step1.rpr_syphilis_test.v_required.err}}" + "value": true }, "relevance": { "rules-engine": { @@ -340,6 +333,7 @@ { "key": "positive", "text": "{{tests_syphilis_sub_form.step1.lab_syphilis_test.options.positive.text}}", + "translation_text": "tests_syphilis_sub_form.step1.lab_syphilis_test.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -347,14 +341,14 @@ { "key": "negative", "text": "{{tests_syphilis_sub_form.step1.lab_syphilis_test.options.negative.text}}", + "translation_text": "tests_syphilis_sub_form.step1.lab_syphilis_test.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" } ], "v_required": { - "value": true, - "err": "{{tests_syphilis_sub_form.step1.lab_syphilis_test.v_required.err}}" + "value": true }, "relevance": { "rules-engine": { @@ -380,24 +374,6 @@ } } }, - { - "key": "syphilis_positive_and_pencillin_allergy_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_syphilis_sub_form.step1.syphilis_positive_and_pencillin_allergy_toaster.text}}", - "toaster_info_text": "{{tests_syphilis_sub_form.step1.syphilis_positive_and_pencillin_allergy_toaster.toaster_info_text}}", - "toaster_info_title": "{{tests_syphilis_sub_form.step1.syphilis_positive_and_pencillin_allergy_toaster.toaster_info_title}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, { "key": "syphilis_danger_toaster", "openmrs_entity_parent": "", @@ -405,6 +381,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_syphilis_sub_form.step1.syphilis_danger_toaster.text}}", + "translation_text": "tests_syphilis_sub_form.step1.syphilis_danger_toaster.text", "toaster_info_text": "{{tests_syphilis_sub_form.step1.syphilis_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_syphilis_sub_form.step1.syphilis_danger_toaster.toaster_info_title}}", "toaster_type": "problem", @@ -418,6 +395,5 @@ } ], "count": 1, - "validate_on_submit": true, "properties_file_name": "tests_syphilis_sub_form" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_tb_screening_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_tb_screening_sub_form.json index 4b9470e90..69e5af933 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_tb_screening_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_tb_screening_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.options.done_today.text}}", + "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.done_today.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.options.done_earlier.text}}", + "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.done_earlier.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -28,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.options.ordered.text}}", + "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.ordered.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -36,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.options.not_done.text}}", + "text": "{{tests_tb_screening_sub_form.step1.tb_screening_status.not_done.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -68,6 +72,7 @@ { "key": "sputum_smear", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.sputum_smear.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.sputum_smear.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165401AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -75,6 +80,7 @@ { "key": "sputum_culture", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.sputum_culture.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.sputum_culture.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165402AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -82,6 +88,7 @@ { "key": "genexpert_machine", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.genexpert_machine.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.genexpert_machine.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165403AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -89,6 +96,7 @@ { "key": "xray_machine", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.xray_machine.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.xray_machine.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165404AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -96,6 +104,7 @@ { "key": "no_sputum_supplies", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.no_sputum_supplies.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.no_sputum_supplies.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165183AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -103,6 +112,7 @@ { "key": "machine_not_functioning", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.machine_not_functioning.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.machine_not_functioning.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165179AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -110,6 +120,7 @@ { "key": "technician_not_available", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.technician_not_available.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.technician_not_available.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -117,6 +128,7 @@ { "key": "other", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_notdone.options.other.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_notdone.options.other.text", "openmrs_entity_parent": "164800AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -206,6 +218,7 @@ { "key": "positive", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_result.options.positive.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_result.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -213,6 +226,7 @@ { "key": "negative", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_result.options.negative.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_result.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -220,6 +234,7 @@ { "key": "inconclusive", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_result.options.inconclusive.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_result.options.inconclusive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -227,6 +242,7 @@ { "key": "incomplete", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_result.options.incomplete.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_result.options.incomplete.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "163339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -251,6 +267,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_tb_screening_sub_form.step1.tb_screening_danger_toaster.text}}", + "translation_text": "tests_tb_screening_sub_form.step1.tb_screening_danger_toaster.text", "toaster_info_text": "{{tests_tb_screening_sub_form.step1.tb_screening_danger_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_tb_screening_sub_form.step1.tb_screening_danger_toaster.toaster_info_title}}", "toaster_type": "problem", diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_toxo_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_toxo_sub_form.json deleted file mode 100644 index a03daa89c..000000000 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_toxo_sub_form.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "content_form": [ - { - "key": "toxo_test_status", - "openmrs_entity_parent": "300AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "163725AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "label": "{{tests_toxo_sub_form.step1.toxo_test_status.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "type": "extended_radio_button", - "content_form": "tests_toxo_sub_form", - "options": [ - { - "key": "done_today", - "text": "{{tests_toxo_sub_form.step1.toxo_test_status.options.done_today.text}}", - "type": "done_today", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "done_earlier", - "text": "{{tests_toxo_sub_form.step1.toxo_test_status.options.done_earlier.text}}", - "type": "done_earlier", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "ordered", - "text": "{{tests_toxo_sub_form.step1.toxo_test_status.options.ordered.text}}", - "type": "ordered", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{tests_toxo_sub_form.step1.toxo_test_status.options.not_done.text}}", - "type": "not_done", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ] - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10dp" - }, - { - "key": "toxo_test_date", - "openmrs_entity_parent": "300AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "163724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{tests_toxo_sub_form.step1.toxo_test_date.hint}}", - "expanded": "false", - "max_date": "today", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_calculation_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{tests_toxo_sub_form.step1.toxo_test_date.v_required.err}}" - } - }, - { - "key": "toxo_igg_test", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163126AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_toxo_sub_form.step1.toxo_igg_test.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "positive", - "text": "{{tests_toxo_sub_form.step1.toxo_igg_test.options.positive.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "negative", - "text": "{{tests_toxo_sub_form.step1.toxo_igg_test.options.negative.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{tests_toxo_sub_form.step1.toxo_igg_test.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "toxo_igm_test", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163126AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_toxo_sub_form.step1.toxo_igm_test.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "positive", - "text": "{{tests_toxo_sub_form.step1.toxo_igm_test.options.positive.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "negative", - "text": "{{tests_toxo_sub_form.step1.toxo_igm_test.options.negative.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{tests_toxo_sub_form.step1.toxo_igm_test.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "toxo_avidity_test", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163126AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_toxo_sub_form.step1.toxo_avidity_test.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "less_than_60", - "text": "{{tests_toxo_sub_form.step1.toxo_avidity_test.options.less_than_60.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "greater_than_60", - "text": "{{tests_toxo_sub_form.step1.toxo_avidity_test.options.greater_than_60.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "163118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{tests_toxo_sub_form.step1.toxo_avidity_test.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster_toxoplasmosis_susceptible", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_toxo_sub_form.step1.toaster_toxoplasmosis_susceptible.text}}", - "toaster_info_text": "{{tests_toxo_sub_form.step1.toaster_toxoplasmosis_susceptible.toaster_info_text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster_toxoplasmosis_immune", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_toxo_sub_form.step1.toaster_toxoplasmosis_immune.text}}", - "toaster_info_text": "{{tests_toxo_sub_form.step1.toaster_toxoplasmosis_immune.toaster_info_text}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - }, - { - "key": "toaster_toxoplasmosis_positive", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_toxo_sub_form.step1.toaster_toxoplasmosis_positive.text}}", - "toaster_info_text": "{{tests_toxo_sub_form.step1.toaster_toxoplasmosis_positive.toaster_info_text}}", - "toaster_type": "problem", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "tests_relevance_rules.yml" - } - } - } - } - ], - "count": 1, - "properties_file_name": "tests_toxo_sub_form" -} - diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_ultrasound_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_ultrasound_sub_form.json index 5a9790877..472545bf3 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_ultrasound_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_ultrasound_sub_form.json @@ -1,489 +1,511 @@ { - "content_form": [ - { - "key": "ultrasound", - "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "163725AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "label": "{{tests_ultrasound_sub_form.step1.ultrasound.label}}", - "label_text_style": "bold", - "text_color": "#000000", - "type": "extended_radio_button", - "options": [ - { - "key": "done_today", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.done_today.text}}", - "type": "done_today", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "done_earlier", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.done_earlier.text}}", - "type": "done_earlier", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "ordered", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.ordered.text}}", - "type": "ordered", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_done", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.not_done.text}}", - "type": "not_done", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "Please select an option" - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10dp" - }, - { - "key": "ultrasound_notdone", - "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165182AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "delayed", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.options.delayed.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165295AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "not_available", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.options.not_available.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165386AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.options.other.text}}", - "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "v_required": { - "value": true, - "err": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.v_required.err}}" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - } - }, - { - "key": "ultrasound_notdone_other", - "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "165435AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "edit_text", - "hint": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone_other.hint}}", - "edit_type": "edit_text", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - }, - "v_required": { - "value": false, - "err": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone_other.v_required.err}}" - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "ultrasound_date_today_hidden", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#000000", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_calculation_rules.yml" - } - } - } - }, - { - "key": "ultrasound_date", - "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept", - "openmrs_entity_id": "163724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "date_picker", - "hint": "{{tests_ultrasound_sub_form.step1.ultrasound_date.hint}}", - "expanded": "false", - "max_date": "today", - "min_date": "today-9m", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - }, - "v_required": { - "value": true, - "err": "{{tests_ultrasound_sub_form.step1.ultrasound_date.v_required.err}}" - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_calculation_rules.yml" - } - } - } - }, - { - "key": "ultrasound_info_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound_info_toaster.text}}", - "toaster_type": "info", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - } - }, - { - "key": "ultrasound_done_early_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_ultrasound_sub_form.step1.ultrasound_done_early_toaster.text}}", - "toaster_info_text": "{{tests_ultrasound_sub_form.step1.ultrasound_done_early_toaster.toaster_info_text}}", - "toaster_info_title": "{{tests_ultrasound_sub_form.step1.ultrasound_done_early_toaster.toaster_info_title}}", - "toaster_type": "positive", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10dp" - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "key": "no_of_fetuses_hidden", - "type": "hidden", - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_calculation_rules.yml" - } - } - } - }, - { - "key": "no_of_fetuses_label", - "type": "label", - "label_text_style": "bold", - "text": "{{tests_ultrasound_sub_form.step1.no_of_fetuses_label.text}}", - "text_color": "#000000", - "v_required": { - "value": true, - "err": "Please select the number of fetus(es)" - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - } - }, - { - "key": "no_of_fetuses", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165387AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "numbers_selector", - "label": "{{tests_ultrasound_sub_form.step1.no_of_fetuses.label}}", - "number_of_selectors": "5", - "start_number": "1", - "max_value": "15", - "text_size": "16px", - "text_color": "#000000", - "selected_text_color": "#ffffff", - "v_required": { - "value": true - }, - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_calculation_rules.yml" - } - } - } - }, - { - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "key": "preeclampsia_risk", - "type": "hidden", - "label_text_style": "bold", - "text_color": "#FF0000", - "v_required": { - "value": false - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_calculation_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10dp" - }, - { - "key": "pre_eclampsia_toaster", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "", - "type": "toaster_notes", - "text": "{{tests_ultrasound_sub_form.step1.pre_eclampsia_toaster.text}}", - "toaster_info_text": "{{tests_ultrasound_sub_form.step1.pre_eclampsia_toaster.toaster_info_text}}", - "toaster_info_title": "{{tests_ultrasound_sub_form.step1.pre_eclampsia_toaster.toaster_info_title}}", - "toaster_type": "warning", - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - } - }, - { - "key": "spacer", - "openmrs_entity_parent": "", - "openmrs_entity": "", - "openmrs_entity_id": "spacer", - "type": "spacer", - "spacer_height": "10dp" - }, - { - "key": "fetal_presentation", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_ultrasound_sub_form.step1.fetal_presentation.label}}", - "label_text_style": "bold", - "label_info_text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.label_info_text}}", - "options": [ - { - "key": "cephalic", - "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.cephalic.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "160091AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "pelvic", - "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.pelvic.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "146922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "transverse", - "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.transverse.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "112259AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "other", - "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.other.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - }, - "calculation": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_calculation_rules.yml" - } - } - } - }, - { - "key": "amniotic_fluid", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165388AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "normal", - "text": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.options.normal.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "reduced", - "text": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.options.reduced.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "162648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "increased", - "text": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.options.increased.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "164471AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - } - }, - { - "key": "placenta_location", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165296AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "type": "native_radio", - "label": "{{tests_ultrasound_sub_form.step1.placenta_location.label}}", - "label_text_style": "bold", - "options": [ - { - "key": "praevia", - "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.praevia.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "114127AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "low", - "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.low.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165297AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "anterior", - "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.anterior.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "540AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "posterior", - "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.posterior.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "541AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "right_side", - "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.right_side.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5141AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "left_side", - "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.left_side.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "5139AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - { - "key": "fundal", - "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.fundal.text}}", - "openmrs_entity_parent": "", - "openmrs_entity": "concept", - "openmrs_entity_id": "165298AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - ], - "relevance": { - "rules-engine": { - "ex-rules": { - "rules-file": "ultrasound_sub_form_relevance_rules.yml" - } - } - } - } - ], - "count": 1, - "validate_on_submit": true, - "properties_file_name": "tests_ultrasound_sub_form" + "content_form": [ + { + "key": "ultrasound", + "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "163725AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "{{tests_ultrasound_sub_form.step1.ultrasound.label}}", + "label_text_style": "bold", + "text_color": "#000000", + "type": "extended_radio_button", + "options": [ + { + "key": "done_today", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.done_today.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound.options.done_today.text", + "type": "done_today", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165383AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "done_earlier", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.done_earlier.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound.options.done_earlier.text", + "type": "done_earlier", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165385AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "ordered", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.ordered.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound.options.ordered.text", + "type": "ordered", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_done", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound.options.not_done.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound.options.not_done.text", + "type": "not_done", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10dp" + }, + { + "key": "ultrasound_notdone", + "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165182AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "delayed", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.options.delayed.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound_notdone.options.delayed.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165295AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "not_available", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.options.not_available.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound_notdone.options.not_available.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165386AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.options.other.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound_notdone.options.other.text", + "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "v_required": { + "value": true, + "err": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone.v_required.err}}" + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + } + }, + { + "key": "ultrasound_notdone_other", + "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "165435AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "edit_text", + "hint": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone_other.hint}}", + "edit_type": "edit_text", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + }, + "v_required": { + "value": false, + "err": "{{tests_ultrasound_sub_form.step1.ultrasound_notdone_other.v_required.err}}" + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "ultrasound_date_today_hidden", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#000000", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_calculation_rules.yml" + } + } + } + }, + { + "key": "ultrasound_date", + "openmrs_entity_parent": "159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "openmrs_entity": "concept", + "openmrs_entity_id": "163724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "date_picker", + "hint": "{{tests_ultrasound_sub_form.step1.ultrasound_date.hint}}", + "expanded": "false", + "max_date": "today", + "min_date": "today-9m", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + }, + "v_required": { + "value": true, + "err": "{{tests_ultrasound_sub_form.step1.ultrasound_date.v_required.err}}" + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_calculation_rules.yml" + } + } + } + }, + { + "key": "ultrasound_info_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound_info_toaster.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound_info_toaster.text", + "toaster_type": "info", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + } + }, + { + "key": "ultrasound_done_early_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{tests_ultrasound_sub_form.step1.ultrasound_done_early_toaster.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.ultrasound_done_early_toaster.text", + "toaster_info_text": "{{tests_ultrasound_sub_form.step1.ultrasound_done_early_toaster.toaster_info_text}}", + "toaster_info_title": "{{tests_ultrasound_sub_form.step1.ultrasound_done_early_toaster.toaster_info_title}}", + "toaster_type": "positive", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10dp" + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "key": "no_of_fetuses_hidden", + "type": "hidden", + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_calculation_rules.yml" + } + } + } + }, + { + "key": "no_of_fetuses_label", + "type": "label", + "label_text_style": "bold", + "text": "{{tests_ultrasound_sub_form.step1.no_of_fetuses_label.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.no_of_fetuses_label.text", + "text_color": "#000000", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + } + }, + { + "key": "no_of_fetuses", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165387AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "numbers_selector", + "label": "{{tests_ultrasound_sub_form.step1.no_of_fetuses.label}}", + "number_of_selectors": "5", + "start_number": "1", + "max_value": "15", + "text_size": "16px", + "text_color": "#000000", + "selected_text_color": "#ffffff", + "v_required": { + "value": true + }, + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_calculation_rules.yml" + } + } + } + }, + { + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "key": "preeclampsia_risk", + "type": "hidden", + "label_text_style": "bold", + "text_color": "#FF0000", + "v_required": { + "value": false + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_calculation_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10dp" + }, + { + "key": "pre_eclampsia_toaster", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "", + "type": "toaster_notes", + "text": "{{tests_ultrasound_sub_form.step1.pre_eclampsia_toaster.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.pre_eclampsia_toaster.text", + "toaster_info_text": "{{tests_ultrasound_sub_form.step1.pre_eclampsia_toaster.toaster_info_text}}", + "toaster_info_title": "{{tests_ultrasound_sub_form.step1.pre_eclampsia_toaster.toaster_info_title}}", + "toaster_type": "warning", + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + } + }, + { + "key": "spacer", + "openmrs_entity_parent": "", + "openmrs_entity": "", + "openmrs_entity_id": "spacer", + "type": "spacer", + "spacer_height": "10dp" + }, + { + "key": "fetal_presentation", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{tests_ultrasound_sub_form.step1.fetal_presentation.label}}", + "label_text_style": "bold", + "label_info_text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.label_info_text}}", + "options": [ + { + "key": "cephalic", + "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.cephalic.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.fetal_presentation.options.cephalic.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "160091AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "pelvic", + "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.pelvic.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.fetal_presentation.options.pelvic.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "146922AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "transverse", + "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.transverse.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.fetal_presentation.options.transverse.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "112259AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "other", + "text": "{{tests_ultrasound_sub_form.step1.fetal_presentation.options.other.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.fetal_presentation.options.other.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + }, + "calculation": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_calculation_rules.yml" + } + } + } + }, + { + "key": "amniotic_fluid", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165388AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "normal", + "text": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.options.normal.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.amniotic_fluid.options.normal.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "1115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "reduced", + "text": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.options.reduced.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.amniotic_fluid.options.reduced.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "162648AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "increased", + "text": "{{tests_ultrasound_sub_form.step1.amniotic_fluid.options.increased.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.amniotic_fluid.options.increased.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "164471AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + } + }, + { + "key": "placenta_location", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165296AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "type": "native_radio", + "label": "{{tests_ultrasound_sub_form.step1.placenta_location.label}}", + "label_text_style": "bold", + "options": [ + { + "key": "praevia", + "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.praevia.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.placenta_location.options.praevia.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "114127AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "low", + "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.low.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.placenta_location.options.low.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165297AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "anterior", + "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.anterior.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.placenta_location.options.anterior.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "540AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "posterior", + "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.posterior.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.placenta_location.options.posterior.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "541AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "right_side", + "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.right_side.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.placenta_location.options.right_side.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5141AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "left_side", + "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.left_side.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.placenta_location.options.left_side.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "5139AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "key": "fundal", + "text": "{{tests_ultrasound_sub_form.step1.placenta_location.options.fundal.text}}", + "translation_text": "tests_ultrasound_sub_form.step1.placenta_location.options.fundal.text", + "openmrs_entity_parent": "", + "openmrs_entity": "concept", + "openmrs_entity_id": "165298AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + ], + "relevance": { + "rules-engine": { + "ex-rules": { + "rules-file": "ultrasound_sub_form_relevance_rules.yml" + } + } + } + } + ], + "count": 1, + "properties_file_name": "tests_ultrasound_sub_form" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/json.form/sub_form/tests_urine_sub_form.json b/opensrp-anc/src/main/assets/json.form/sub_form/tests_urine_sub_form.json index e0b7dfe7b..6b554dbc2 100644 --- a/opensrp-anc/src/main/assets/json.form/sub_form/tests_urine_sub_form.json +++ b/opensrp-anc/src/main/assets/json.form/sub_form/tests_urine_sub_form.json @@ -12,7 +12,8 @@ "options": [ { "key": "done_today", - "text": "{{tests_urine_sub_form.step1.urine_test_status.options.done_today.text}}", + "text": "{{tests_urine_sub_form.step1.urine_test_status.done_today.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_status.done_today.text", "type": "done_today", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -20,7 +21,8 @@ }, { "key": "done_earlier", - "text": "{{tests_urine_sub_form.step1.urine_test_status.options.done_earlier.text}}", + "text": "{{tests_urine_sub_form.step1.urine_test_status.done_earlier.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_status.done_earlier.text", "type": "done_earlier", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -28,7 +30,8 @@ }, { "key": "ordered", - "text": "{{tests_urine_sub_form.step1.urine_test_status.options.ordered.text}}", + "text": "{{tests_urine_sub_form.step1.urine_test_status.ordered.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_status.ordered.text", "type": "ordered", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -36,7 +39,8 @@ }, { "key": "not_done", - "text": "{{tests_urine_sub_form.step1.urine_test_status.options.not_done.text}}", + "text": "{{tests_urine_sub_form.step1.urine_test_status.not_done.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_status.not_done.text", "type": "not_done", "openmrs_entity_parent": "", "openmrs_entity": "concept", @@ -60,6 +64,7 @@ { "key": "stock_out", "text": "{{tests_urine_sub_form.step1.urine_test_notdone.options.stock_out.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_notdone.options.stock_out.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165183AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -67,6 +72,7 @@ { "key": "expired_stock", "text": "{{tests_urine_sub_form.step1.urine_test_notdone.options.expired_stock.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_notdone.options.expired_stock.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -74,6 +80,7 @@ { "key": "other", "text": "{{tests_urine_sub_form.step1.urine_test_notdone.options.other.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_notdone.options.other.text", "openmrs_entity_parent": "161156AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "openmrs_entity": "concept", "openmrs_entity_id": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -166,13 +173,14 @@ "openmrs_entity_id": "165438AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "type": "check_box", "label": "{{tests_urine_sub_form.step1.urine_test_type.label}}", - "label_info_text": "Midstream urine culture is the preferred method for testing for asymptomatic bacteriuria (ASB) in pregnancy. If culture is not available, midstream urine Gram-staining is recommended over dipstick.", - "label_info_title": "Urine test", + "label_info_text": "{{tests_urine_sub_form.step1.urine_test_type.label_info_text}}", + "label_info_title": "{{tests_urine_sub_form.step1.urine_test_type.label_info_title}}", "label_text_style": "bold", "options": [ { "key": "midstream_urine_culture", "text": "{{tests_urine_sub_form.step1.urine_test_type.options.midstream_urine_culture.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_type.options.midstream_urine_culture.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165392AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -180,6 +188,7 @@ { "key": "midstream_urine_gram", "text": "{{tests_urine_sub_form.step1.urine_test_type.options.midstream_urine_gram.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_type.options.midstream_urine_gram.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165304AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -187,6 +196,7 @@ { "key": "urine_dipstick", "text": "{{tests_urine_sub_form.step1.urine_test_type.options.urine_dipstick.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_test_type.options.urine_dipstick.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1618AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -216,6 +226,7 @@ { "key": "positive_any", "text": "{{tests_urine_sub_form.step1.urine_culture.options.positive_any.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_culture.options.positive_any.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165390AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -223,6 +234,7 @@ { "key": "positive_gbs", "text": "{{tests_urine_sub_form.step1.urine_culture.options.positive_gbs.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_culture.options.positive_gbs.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165391AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -230,6 +242,7 @@ { "key": "negative", "text": "{{tests_urine_sub_form.step1.urine_culture.options.negative.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_culture.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165393AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -237,6 +250,7 @@ { "key": "not_available", "text": "{{tests_urine_sub_form.step1.urine_culture.options.not_available.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_culture.options.not_available.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "165390AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -266,6 +280,7 @@ { "key": "positive", "text": "{{tests_urine_sub_form.step1.urine_gram_stain.options.positive.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_gram_stain.options.positive.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -273,6 +288,7 @@ { "key": "negative", "text": "{{tests_urine_sub_form.step1.urine_gram_stain.options.negative.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_gram_stain.options.negative.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -302,6 +318,7 @@ { "key": "none", "text": "{{tests_urine_sub_form.step1.urine_nitrites.options.none.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_nitrites.options.none.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -309,6 +326,7 @@ { "key": "+", "text": "{{tests_urine_sub_form.step1.urine_nitrites.options.plus_one.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_nitrites.options.plus_one.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -316,6 +334,7 @@ { "key": "++", "text": "{{tests_urine_sub_form.step1.urine_nitrites.options.plus_two.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_nitrites.options.plus_two.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -323,6 +342,7 @@ { "key": "+++", "text": "{{tests_urine_sub_form.step1.urine_nitrites.options.plus_three.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_nitrites.options.plus_three.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -330,6 +350,7 @@ { "key": "++++", "text": "{{tests_urine_sub_form.step1.urine_nitrites.options.plus_four.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_nitrites.options.plus_four.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -359,6 +380,7 @@ { "key": "none", "text": "{{tests_urine_sub_form.step1.urine_leukocytes.options.none.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_leukocytes.options.none.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -366,6 +388,7 @@ { "key": "+", "text": "{{tests_urine_sub_form.step1.urine_leukocytes.options.plus_one.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_leukocytes.options.plus_one.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -373,6 +396,7 @@ { "key": "++", "text": "{{tests_urine_sub_form.step1.urine_leukocytes.options.plus_two.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_leukocytes.options.plus_two.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -380,6 +404,7 @@ { "key": "+++", "text": "{{tests_urine_sub_form.step1.urine_leukocytes.options.plus_three.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_leukocytes.options.plus_three.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -387,6 +412,7 @@ { "key": "++++", "text": "{{tests_urine_sub_form.step1.urine_leukocytes.options.plus_four.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_leukocytes.options.plus_four.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -416,6 +442,7 @@ { "key": "none", "text": "{{tests_urine_sub_form.step1.urine_protein.options.none.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_protein.options.none.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -423,6 +450,7 @@ { "key": "+", "text": "{{tests_urine_sub_form.step1.urine_protein.options.plus_one.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_protein.options.plus_one.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -430,6 +458,7 @@ { "key": "++", "text": "{{tests_urine_sub_form.step1.urine_protein.options.plus_two.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_protein.options.plus_two.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -437,6 +466,7 @@ { "key": "+++", "text": "{{tests_urine_sub_form.step1.urine_protein.options.plus_three.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_protein.options.plus_three.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -444,6 +474,7 @@ { "key": "++++", "text": "{{tests_urine_sub_form.step1.urine_protein.options.plus_four.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_protein.options.plus_four.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -473,6 +504,7 @@ { "key": "none", "text": "{{tests_urine_sub_form.step1.urine_glucose.options.none.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_glucose.options.none.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -480,6 +512,7 @@ { "key": "+", "text": "{{tests_urine_sub_form.step1.urine_glucose.options.plus_one.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_glucose.options.plus_one.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -487,6 +520,7 @@ { "key": "++", "text": "{{tests_urine_sub_form.step1.urine_glucose.options.plus_two.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_glucose.options.plus_two.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -494,6 +528,7 @@ { "key": "+++", "text": "{{tests_urine_sub_form.step1.urine_glucose.options.plus_three.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_glucose.options.plus_three.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -501,6 +536,7 @@ { "key": "++++", "text": "{{tests_urine_sub_form.step1.urine_glucose.options.plus_four.text}}", + "translation_text": "tests_urine_sub_form.step1.urine_glucose.options.plus_four.text", "openmrs_entity_parent": "", "openmrs_entity": "concept", "openmrs_entity_id": "1365AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" @@ -539,6 +575,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_urine_sub_form.step1.gdm_risk_toaster.text}}", + "translation_text": "tests_urine_sub_form.step1.gdm_risk_toaster.text", "toaster_info_text": "{{tests_urine_sub_form.step1.gdm_risk_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_urine_sub_form.step1.gdm_risk_toaster.toaster_info_title}}", "toaster_type": "warning", @@ -573,6 +610,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_urine_sub_form.step1.asb_positive_toaster.text}}", + "translation_text": "tests_urine_sub_form.step1.asb_positive_toaster.text", "toaster_info_text": "{{tests_urine_sub_form.step1.asb_positive_toaster.toaster_info_text}}", "toaster_info_title": "{{tests_urine_sub_form.step1.asb_positive_toaster.toaster_info_title}}", "toaster_type": "warning", @@ -591,6 +629,7 @@ "openmrs_entity_id": "", "type": "toaster_notes", "text": "{{tests_urine_sub_form.step1.gbs_agent_note.text}}", + "translation_text": "tests_urine_sub_form.step1.gbs_agent_note.text", "toaster_info_text": "{{tests_urine_sub_form.step1.gbs_agent_note.toaster_info_text}}", "toaster_info_title": "{{tests_urine_sub_form.step1.gbs_agent_note.toaster_info_title}}", "toaster_type": "warning", @@ -604,6 +643,5 @@ } ], "count": 1, - "properties_file_name": "tests_urine_sub_form", - "validate_on_submit": true + "properties_file_name": "tests_urine_sub_form" } \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/anc_quick_check_relevance.yml b/opensrp-anc/src/main/assets/rule/anc_quick_check_relevance.yml new file mode 100644 index 000000000..7ec7c8dd7 --- /dev/null +++ b/opensrp-anc/src/main/assets/rule/anc_quick_check_relevance.yml @@ -0,0 +1,28 @@ +--- +name: step1_visit_date_toaster +description: Shows when visit_date is invalid. +priority: 1 +condition: "!helper.validateVisitDate(global_entity_id, step1_visit_date)" +actions: + - "isRelevant = true" +--- +name: step1_specific_complaint +description: danger_signs +priority: 1 +condition: "!step1_contact_reason.isEmpty() && step1_contact_reason == 'specific_complaint'" +actions: + - "isRelevant = true" +--- +name: step1_specific_complaint_other +description: danger_signs +priority: 1 +condition: "step1_specific_complaint.contains('other_specify')" +actions: + - "isRelevant = true" +--- +name: step1_danger_signs +description: danger_signs +priority: 1 +condition: "!step1_contact_reason.isEmpty()" +actions: + - "isRelevant = true" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/registration_calculation_rules.yml b/opensrp-anc/src/main/assets/rule/anc_register_calculation.yml similarity index 100% rename from opensrp-anc/src/main/assets/rule/registration_calculation_rules.yml rename to opensrp-anc/src/main/assets/rule/anc_register_calculation.yml index a1bd92e6c..d8131da7e 100644 --- a/opensrp-anc/src/main/assets/rule/registration_calculation_rules.yml +++ b/opensrp-anc/src/main/assets/rule/anc_register_calculation.yml @@ -1,11 +1,4 @@ --- -name: step1_age_calculated -description: Calculated Age -priority: 1 -condition: "step1_dob_entered != ''" -actions: - - 'calculation = helper.getDifferenceDays(step1_dob_entered) / 365.25' ---- name: step1_dob_calculated description: Calculated D.O.B priority: 1 @@ -13,6 +6,13 @@ condition: "step1_age_entered != ''" actions: - 'calculation = helper.getDOBFromAge(step1_age_entered)' --- +name: step1_age_calculated +description: Calculated Age +priority: 1 +condition: "step1_dob_entered != ''" +actions: + - 'calculation = helper.getDifferenceDays(step1_dob_entered) / 365.25' +--- name: step1_dob description: Final calculated DOB priority: 1 diff --git a/opensrp-anc/src/main/assets/rule/anc_register_relevance.yml b/opensrp-anc/src/main/assets/rule/anc_register_relevance.yml new file mode 100644 index 000000000..e8ca37878 --- /dev/null +++ b/opensrp-anc/src/main/assets/rule/anc_register_relevance.yml @@ -0,0 +1,42 @@ +--- +name: step1_uid +description: Hide "uid" input field if "uid_unknown" option is selected. +priority: 1 +condition: "(!step1_uid_unknown.contains('yes'))" +actions: + - "isRelevant = true" +--- +name: step1_uid_unknown_reason +description: Show "unknown_uid_reason" input field if "uid_unknown" option is selected. +priority: 1 +condition: "(step1_uid_unknown.contains('yes'))" +actions: + - "isRelevant = true" +--- +name: step1_dob_entered +description: Hide "dob_entered" input field if "dob_unknown" option is selected. +priority: 1 +condition: "(!step1_dob_unknown.contains('yes'))" +actions: + - "isRelevant = true" +--- +name: step1_age_entered +description: Show "age_entered" input field if "dob_unknown" option is selected. +priority: 1 +condition: "(step1_dob_unknown.contains('yes'))" +actions: + - "isRelevant = true" +--- +name: step1_phone_number +description: Hide "phone_number" input field if "phone_number_unknown" option is selected. +priority: 1 +condition: "(!step1_phone_number_unknown.contains('yes'))" +actions: + - "isRelevant = true" +--- +name: step1_phone_number_unknown_reason +description: Show "unknown_uid_reason" input field if "uid_unknown" option is selected. +priority: 1 +condition: "(step1_phone_number_unknown.contains('yes'))" +actions: + - "isRelevant = true" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/contact-rules.yml b/opensrp-anc/src/main/assets/rule/contact-rules.yml index d8ae6c478..05385b316 100644 --- a/opensrp-anc/src/main/assets/rule/contact-rules.yml +++ b/opensrp-anc/src/main/assets/rule/contact-rules.yml @@ -1,70 +1,48 @@ --- -name: after_eight -description: after eight weeks +name: first_tm +description: First Trisemester priority: 2 -condition: "contactRule.currentVisit < 20" +condition: "contactRule.currentVisit <= 12" actions: - - "contactRule.currentVisit = contactRule.currentVisit + 8" + - "contactRule.currentVisit = 13" - "contactRule.set.add(contactRule.currentVisit)" --- -name: after_six -description: after six weeks +name: second_tm_1 +description: Second Trisemester (1) priority: 2 -condition: "contactRule.currentVisit >= 20 && contactRule.currentVisit < 26" +condition: "contactRule.currentVisit > 12 && contactRule.currentVisit < 20" actions: - - "contactRule.currentVisit = contactRule.currentVisit + 6" + - "contactRule.currentVisit = contactRule.currentVisit + 7" - "contactRule.set.add(contactRule.currentVisit)" --- -name: after_four -description: after four weeks +name: second_tm_2 +description: Second Trisemester (2) priority: 2 -condition: "contactRule.currentVisit >= 26 && contactRule.currentVisit < 34" +condition: "contactRule.currentVisit >= 20 && contactRule.currentVisit < 27" actions: - - "contactRule.currentVisit = contactRule.currentVisit + 4" - - "contactRule.set.add(contactRule.currentVisit)" + - "contactRule.currentVisit = 27" + - "contactRule.set.add(contactRule.currentVisit)" --- -name: after_two -description: after two weeks +name: third_tm_1 +description: Third Trisemester (1) priority: 2 -condition: "contactRule.currentVisit >= 34 && contactRule.currentVisit < 40" -actions: - - "contactRule.currentVisit = contactRule.currentVisit + 2" - - "contactRule.set.add(contactRule.currentVisit)" ---- -name: contains_40 -description: contains 40 weeks -priority: 3 -condition: "!contactRule.set.contains(40) && contactRule.initialVisit != 41" -actions: - - "contactRule.set.add(40)" ---- -name: contains_41 -description: contains 41 weeks -priority: 3 -condition: "!contactRule.set.contains(41)" +condition: "contactRule.currentVisit >= 27 && contactRule.currentVisit < 32" actions: - - "contactRule.set.add(41)" ---- -name: first_visit_22_23 -description: first visit is 22 or 23 weeks -priority: 1 -condition: "contactRule.isFirst && (contactRule.initialVisit == 22 || contactRule.initialVisit == 23) && contactRule.currentVisit >= 30 && contactRule.currentVisit < 40" -actions: - - "contactRule.currentVisit = contactRule.currentVisit + 2" - - "contactRule.set.add(contactRule.currentVisit)" + - "contactRule.currentVisit = 32" + - "contactRule.set.add(contactRule.currentVisit)" --- -name: first_visit_28_29 -description: first visit is 28 or 29 weeks -priority: 1 -condition: "contactRule.isFirst && (contactRule.initialVisit == 28 || contactRule.initialVisit == 29) && contactRule.currentVisit >= 32 && contactRule.currentVisit < 40" +name: third_tm_2 +description: Third Trisemester (2) +priority: 2 +condition: "contactRule.currentVisit >= 32 && contactRule.currentVisit < 37" actions: - - "contactRule.currentVisit = contactRule.currentVisit + 2" - - "contactRule.set.add(contactRule.currentVisit)" + - "contactRule.currentVisit = 37" + - "contactRule.set.add(contactRule.currentVisit)" --- -name: first_visit_30 -description: first visit is 30 weeks -priority: 1 -condition: "contactRule.isFirst && (contactRule.initialVisit >= 30) && contactRule.currentVisit < 40" +name: third_tm_3 +description: Third Trisemester (3) +priority: 2 +condition: "contactRule.currentVisit >= 37 && contactRule.currentVisit < 40" actions: - - "contactRule.currentVisit = contactRule.currentVisit + 2" - - "contactRule.set.add(contactRule.currentVisit)" \ No newline at end of file + - "contactRule.currentVisit = 40" + - "contactRule.set.add(contactRule.currentVisit)" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/ct_calculation_rules.yml b/opensrp-anc/src/main/assets/rule/ct_calculation_rules.yml index e682ad425..2e01a80ee 100644 --- a/opensrp-anc/src/main/assets/rule/ct_calculation_rules.yml +++ b/opensrp-anc/src/main/assets/rule/ct_calculation_rules.yml @@ -18,112 +18,112 @@ description: Hypertension and symptom of severe priority: 1 condition: "global_hypertension == 1 && !global_symp_sev_preeclampsia.isEmpty() && !global_symp_sev_preeclampsia.contains('none')" actions: - - 'calculation = ["symp_sev_preeclampsia" : global_symp_sev_preeclampsia_value]' + - 'calculation = ["symp_sev_preeclampsia" : global_symp_sev_preeclampsia_value]' --- name: step1_fever_toaster description: Fever temp priority: 1 condition: "global_body_temp_repeat >= 38" actions: - - 'calculation = ["body_temp_repeat" : global_body_temp_repeat]' + - 'calculation = ["body_temp_repeat" : global_body_temp_repeat]' --- name: step1_abnormal_pulse_rate_toaster description: Abnormal pulse rate priority: 1 condition: "global_pulse_rate_repeat < 60 || global_pulse_rate_repeat > 100" actions: - - 'calculation = ["pulse_rate_repeat" : global_pulse_rate_repeat]' + - 'calculation = ["pulse_rate_repeat" : global_pulse_rate_repeat]' --- name: step1_resp_distress_toaster description: Respiratory distress priority: 1 condition: "global_respiratory_exam == 3" actions: - - 'calculation = ["respiratory_exam_abnormal" : global_respiratory_exam_abnormal_value]' + - 'calculation = ["respiratory_exam_abnormal" : global_respiratory_exam_abnormal_value]' --- name: step1_low_oximetry_toaster description: Low oximetry priority: 1 condition: "global_oximetry < 92" actions: - - 'calculation = ["oximetry" : global_oximetry]' + - 'calculation = ["oximetry" : global_oximetry]' --- name: step1_abn_cardiac_exam_toaster description: Abnormal cardiac exam priority: 1 condition: "global_cardiac_exam == 3" actions: - - 'calculation = ["cardiac_exam_abnormal" : global_cardiac_exam_abnormal_value, "cardiac_exam_abnormal_other": global_cardiac_exam_abnormal_other]' + - 'calculation = ["cardiac_exam_abnormal" : global_cardiac_exam_abnormal_value, "cardiac_exam_abnormal_other": global_cardiac_exam_abnormal_other]' --- name: step1_abn_breast_exam_toaster description: Abnormal breast exam priority: 1 condition: "global_breast_exam == 3" actions: - - 'calculation = ["breast_exam_abnormal" : global_breast_exam_abnormal_value, "breast_exam_abnormal_other": global_breast_exam_abnormal_other]' + - 'calculation = ["breast_exam_abnormal" : global_breast_exam_abnormal_value, "breast_exam_abnormal_other": global_breast_exam_abnormal_other]' --- name: step1_abn_abdominal_exam_toaster description: Abnormal abdominal exam priority: 1 condition: "global_abdominal_exam == 3" actions: - - 'calculation = ["abdominal_exam_abnormal" : global_abdominal_exam_abnormal_value, "abdominal_exam_abnormal_other": global_abdominal_exam_abnormal_other]' + - 'calculation = ["abdominal_exam_abnormal" : global_abdominal_exam_abnormal_value, "abdominal_exam_abnormal_other": global_abdominal_exam_abnormal_other]' --- name: step1_abn_pelvic_exam_toaster description: Abnormal pelvic exam priority: 1 condition: "global_pelvic_exam == 3" actions: - - 'calculation = ["pelvic_exam_abnormal" : global_pelvic_exam_abnormal_value, "pelvic_exam_abnormal_other": global_pelvic_exam_abnormal_other]' + - 'calculation = ["pelvic_exam_abnormal" : global_pelvic_exam_abnormal_value, "pelvic_exam_abnormal_other": global_pelvic_exam_abnormal_other]' --- name: step1_abn_feat_heart_rate_toaster description: Abnormal fetal heart rate priority: 1 condition: "global_fetal_heart_rate_repeat < 110 || global_fetal_heart_rate_repeat > 160" actions: - - 'calculation = ["fetal_heart_rate_repeat" : global_fetal_heart_rate_repeat]' + - 'calculation = ["fetal_heart_rate_repeat" : global_fetal_heart_rate_repeat]' --- name: step4_body_mass_toaster description: Information priority: 1 condition: "true" actions: - - 'calculation = ["bmi" : global_bmi, "weight_cat" : global_weight_cat, "exp_weight_gain" : global_exp_weight_gain]' + - 'calculation = ["bmi" : global_bmi, "weight_cat" : global_weight_cat, "exp_weight_gain" : global_exp_weight_gain]' --- name: step4_average_weight_toaster description: Information priority: 1 condition: "true" actions: - - 'calculation = ["weight_gain" : global_weight_gain, "tot_weight_gain" : global_tot_weight_gain]' + - 'calculation = ["weight_gain" : global_weight_gain, "tot_weight_gain" : global_tot_weight_gain]' --- name: step3_mag_calc description: mag_calc priority: 1 condition: "true" actions: - - 'calculation = (step3_leg_cramp_not_relieved_counsel == "done" ? "Magnesium and calcium for persistent leg cramps" : "")' + - 'calculation = (step3_leg_cramp_not_relieved_counsel == "done" ? "Magnesium and calcium for persistent leg cramps" : "")' --- name: step3_nausea_pharma description: nausea_pharma priority: 1 condition: "true" actions: - - 'calculation = (step3_nausea_not_relieved_counsel == "done" ? "Pharmacologicals for persistent nausea and vomiting" : "")' + - 'calculation = (step3_nausea_not_relieved_counsel == "done" ? "Pharmacologicals for persistent nausea and vomiting" : "")' --- name: step3_antacid description: antacid priority: 1 condition: "true" actions: - - 'calculation = (step3_heartburn_not_relieved_counsel == "done" ? "Antacids for persistent heartburn" : "")' + - 'calculation = (step3_heartburn_not_relieved_counsel == "done" ? "Antacids for persistent heartburn" : "")' --- name: step5_penicillin description: penicillin priority: 1 condition: "true" actions: - - 'calculation = (step5_syphilis_high_prev_counsel == "done" || step5_syphilis_low_prev_counsel == "done" ? ((!global_allergies.isEmpty() && global_allergies.contains("penicillin")) ? "Erythromycin 500 mg orally four times daily for 14 days or Azithromycin 2 g once orally." : "Penicillin for syphilis") : "") ' + - 'calculation = (step5_syphilis_high_prev_counsel == "done" || step5_syphilis_low_prev_counsel == "done" ? ((!global_allergies.isEmpty() && global_allergies.contains("penicillin")) ? "Erythromycin 500 mg orally four times daily for 14 days or Azithromycin 2 g once orally." : "Penicillin for syphilis") : "") ' --- name: step5_ifa_medication description: ifa_medication @@ -137,7 +137,7 @@ description: antibiotic priority: 1 condition: "true" actions: - - 'calculation = (step5_asb_positive_counsel == "done" ? "Seven-day antibiotic for ASB" : "") ' + - 'calculation = (step5_asb_positive_counsel == "done" ? "Seven-day antibiotic for ASB" : "") ' --- name: step5_low_prev_allergy_toaster description: Displays the womans allergies . @@ -158,21 +158,21 @@ description: aspirin priority: 1 condition: "true" actions: - - 'calculation = ((step6_pe_risk_aspirin == "done" || step6_pe_risk_aspirin_calcium == "done") ? "Aspirin for pre-eclampsia risk" : "") ' + - 'calculation = ((step6_pe_risk_aspirin == "done" || step6_pe_risk_aspirin_calcium == "done") ? "Aspirin for pre-eclampsia risk" : "") ' --- name: step6_prep description: prep priority: 1 condition: "true" actions: - - 'calculation = (step6_hiv_prep == "done" ? "HIV Pre-exposure prophylaxis (PrEP)" : "") ' + - 'calculation = (step6_hiv_prep == "done" ? "HIV Pre-exposure prophylaxis (PrEP)" : "") ' --- name: step9_ifa description: ifa priority: 1 condition: "true" actions: - - 'calculation = ((step9_ifa_high_prev == "done" || step9_ifa_low_prev == "done") ? "Iron & folic acid supplement" : "") ' + - 'calculation = ((step9_ifa_high_prev == "done" || step9_ifa_low_prev == "done") ? "Iron & folic acid supplement" : "") ' --- name: step9_ifa_high_prev_toaster description: Displays the womans allergies . @@ -193,7 +193,7 @@ description: alben_meben priority: 1 condition: "true" actions: - - 'calculation = (step10_deworm == "done" ? "Albendazole/mebendazole for deworming" : "")' + - 'calculation = (step10_deworm == "done" ? "Albendazole/mebendazole for deworming" : "")' --- name: step10_deworm_toaster description: Displays the womans allergies . @@ -207,88 +207,88 @@ description: sp priority: 1 condition: "true" actions: - - 'calculation = (step10_iptp_sp1 == "done" ? "Sulfadoxine-pyrimethamine (SP) for malaria prevention" : "") ' + - 'calculation = (step10_iptp_sp1 == "done" ? "Sulfadoxine-pyrimethamine (SP) for malaria prevention" : "") ' --- name: step9_calcium description: calcium priority: 1 condition: "true" actions: - - 'calculation = (step9_calcium_supp == "done" ? "Calcium supplement" : "") ' + - 'calculation = (step9_calcium_supp == "done" ? "Calcium supplement" : "") ' --- name: step9_vita description: vita priority: 1 condition: "true" actions: - - 'calculation = (step9_vita_supp == "done" ? "Vitamin A supplement" : "") ' + - 'calculation = (step9_vita_supp == "done" ? "Vitamin A supplement" : "") ' --- name: step10_iptp_sp1_dose_number description: iptp_sp1_dose_number priority: 1 condition: "step10_iptp_sp1 != '' && step10_iptp_sp1 == 'done'" actions: - - "calculation = 1" + - "calculation = 1" --- name: step10_iptp_sp2_dose_number description: iptp_sp2_dose_number priority: 1 condition: "step10_iptp_sp2 != '' && step10_iptp_sp2 == 'done'" actions: - - "calculation = 2" + - "calculation = 2" --- name: step10_iptp_sp3_dose_number description: iptp_sp3_dose_number priority: 1 condition: "step10_iptp_sp3 != '' && step10_iptp_sp3 == 'done'" actions: - - "calculation = 3" + - "calculation = 3" --- name: step11_tt1_date_done_date_today_hidden description: tt1_date_done_today priority: 1 condition: "step11_tt1_date != '' && step11_tt1_date == 'done_today'" actions: - - "calculation = helper.getDateToday()" + - "calculation = helper.getDateToday()" --- name: step11_tt1_dose_number description: tt1_dose_number priority: 1 condition: "step11_tt1_date != '' && step11_tt1_date != 'not_done'" actions: - - "calculation = 1" + - "calculation = 1" --- name: step11_tt2_date_done_date_today_hidden description: tt2_date_done priority: 1 condition: "step11_tt2_date != '' && step11_tt2_date == 'done_today'" actions: - - "calculation = helper.getDateToday()" + - "calculation = helper.getDateToday()" --- name: step11_tt2_dose_number description: tt2_dose_number priority: 1 condition: "step11_tt2_date != '' && step11_tt2_date != 'not_done'" actions: - - "calculation = 2" + - "calculation = 2" --- name: step11_tt3_date_done_date_today_hidden description: tt3_date_done_today priority: 1 condition: "step11_tt3_date != '' && step11_tt3_date == 'done_today'" actions: - - "calculation = helper.getDateToday()" + - "calculation = helper.getDateToday()" --- name: step11_tt3_dose_number description: tt3_dose_number priority: 1 condition: "step11_tt3_date != '' && step11_tt3_date != 'not_done'" actions: - - "calculation = 3" + - "calculation = 3" --- name: step11_flu_date_done_date_today_hidden description: Date flu dose was given priority: 1 condition: "step11_flu_date != '' && step11_flu_date == 'done_today'" actions: - - "calculation = helper.getDateToday()" \ No newline at end of file + - "calculation = helper.getDateToday()" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/ct_relevance_rules.yml b/opensrp-anc/src/main/assets/rule/ct_relevance_rules.yml index ffbd0d659..4111c9cf4 100644 --- a/opensrp-anc/src/main/assets/rule/ct_relevance_rules.yml +++ b/opensrp-anc/src/main/assets/rule/ct_relevance_rules.yml @@ -2,7 +2,7 @@ name: step1_danger_signs_toaster description: Danger sign problem toaster priority: 1 -condition: "!global_danger_signs.isEmpty() && !global_danger_signs.contains('danger_none') && global_danger_signs_value != 'None'" +condition: "global_danger_signs && !global_danger_signs.isEmpty() && !global_danger_signs.contains('danger_none') && global_danger_signs_value != 'None'" actions: - "isRelevant = true" --- @@ -107,7 +107,7 @@ actions: name: step1_referred_hosp description: Referred to hospital priority: 1 -condition: "(global_severe_hypertension != '' && global_severe_hypertension == 1) || (!global_danger_signs.isEmpty() && !global_danger_signs.contains('danger_none') && global_danger_signs_value != 'None') || (global_hypertension != '' && global_hypertension == 1 && !global_symp_sev_preeclampsia.isEmpty() && !global_symp_sev_preeclampsia.contains('none')) || (global_preeclampsia != '' && global_preeclampsia == 1) || (global_severe_preeclampsia != '' && global_severe_preeclampsia == 1) || (global_body_temp_repeat != '' && global_body_temp_repeat >= 38) || global_pulse_rate_repeat != '' && (global_pulse_rate_repeat < 60 || global_pulse_rate_repeat > 100) || global_respiratory_exam == 3 || global_cardiac_exam == 3 || global_breast_exam == 3 || global_abdominal_exam == 3 || global_pelvic_exam == 3 || (global_fetal_heartbeat == 'no' && global_gest_age_openmrs > 20) || global_fetal_heart_rate_repeat != '' && (global_fetal_heart_rate_repeat < 110 || global_fetal_heart_rate_repeat > 160)" +condition: "(global_danger_signs && global_severe_hypertension != '' && global_severe_hypertension == 1) || (!global_danger_signs.isEmpty() && !global_danger_signs.contains('danger_none') && global_danger_signs_value != 'None') || (global_hypertension != '' && global_hypertension == 1 && !global_symp_sev_preeclampsia.isEmpty() && !global_symp_sev_preeclampsia.contains('none')) || (global_preeclampsia != '' && global_preeclampsia == 1) || (global_severe_preeclampsia != '' && global_severe_preeclampsia == 1) || (global_body_temp_repeat != '' && global_body_temp_repeat >= 38) || global_pulse_rate_repeat != '' && (global_pulse_rate_repeat < 60 || global_pulse_rate_repeat > 100) || global_respiratory_exam == 3 || global_cardiac_exam == 3 || global_breast_exam == 3 || global_abdominal_exam == 3 || global_pelvic_exam == 3 || (global_fetal_heartbeat == 'no' && global_gest_age_openmrs > 20) || global_fetal_heart_rate_repeat != '' && (global_fetal_heart_rate_repeat < 110 || global_fetal_heart_rate_repeat > 160)" actions: - "isRelevant = true" --- @@ -233,14 +233,14 @@ actions: name: step4_increase_energy_counsel description: Increase daily energy and protein intake counseling priority: 1 -condition: "global_pop_undernourish == true && global_weight_cat == 'Underweight'" +condition: "global_pop_undernourish == true && global_weight_cat == helper.weightIMT('Underweight')" actions: - "isRelevant = true" --- name: step4_balanced_energy_counsel description: Balanced energy and protein dietary supplementation counseling priority: 1 -condition: "global_pop_undernourish == true && global_weight_cat == 'Underweight'" +condition: "global_pop_undernourish == true && global_weight_cat == helper.weightIMT('Underweight')" actions: - "isRelevant = true" --- diff --git a/opensrp-anc/src/main/assets/rule/physical-exam-calculations-rules.yml b/opensrp-anc/src/main/assets/rule/physical-exam-calculations-rules.yml index 64d685de8..bdc1b0331 100644 --- a/opensrp-anc/src/main/assets/rule/physical-exam-calculations-rules.yml +++ b/opensrp-anc/src/main/assets/rule/physical-exam-calculations-rules.yml @@ -18,14 +18,14 @@ description: weight cat tingz priority: 1 condition: "true" actions: - - "calculation = (step1_bmi < 18.5 ? 'Underweight' : ((step1_bmi >= 18.5 && step1_bmi < 25) ? 'Normal Weight' : ((step1_bmi >= 25 && step1_bmi < 30) ? 'Overweight' : 'Obese')))" + - "calculation = helper.weightCatString(step1_bmi)" --- name: step1_exp_weight_gain description: weight gain tingz priority: 1 condition: "true" actions: - - "calculation = (step1_weight_cat == 'Underweight' ? '12.5 - 18': (step1_weight_cat == 'Normal Weight' ? '11.5 - 16' : (step1_weight_cat == 'Overweight' ? '7 - 11.5' : '5 - 9')))" + - "calculation = helper.expWeightGain(step1_bmi)" --- name: step1_gdm_risk description: gdm risk @@ -69,58 +69,65 @@ condition: "true" actions: - "calculation = ['weight_gain' : step1_weight_gain,'tot_weight_gain' : step1_tot_weight_gain]" --- -name: step2_hypertension +name: step2_muac_cat +description: MUAC category is calculated based on 23.5 cm cut off +priority: 1 +condition: "true" +actions: + - "calculation = helper.muacCatString(step2_muac)" +--- +name: step3_hypertension description: Hypertension Diognosis priority: 1 -condition: "step2_urine_protein == 'none' || step2_urine_protein == '+'" +condition: "step3_urine_protein == 'none' || step3_urine_protein == '+'" actions: - "calculation = 1" --- -name: step2_severe_hypertension +name: step3_severe_hypertension description: Severe hypertension priority: 1 -condition: "(step2_hypertension == 1 && (step2_bp_systolic_repeat >= 160 || step2_bp_diastolic_repeat >= 110))" +condition: "(step3_hypertension == 1 && (step3_bp_systolic_repeat >= 160 || step3_bp_diastolic_repeat >= 110))" actions: - "calculation = 1" --- -name: step2_severe_preeclampsia +name: step3_severe_preeclampsia description: Severe preeclampsia priority: 1 -condition: "((step2_bp_systolic_repeat >= 160 || step2_bp_diastolic_repeat >= 110) && (step2_urine_protein == '++' || step2_urine_protein == '+++' || step2_urine_protein == '++++')) || ((step2_urine_protein == '++' || step2_urine_protein == '+++' || step2_urine_protein == '++++') && (!step2_symp_sev_preeclampsia.isEmpty() && !step2_symp_sev_preeclampsia.contains('none')))" +condition: "((step3_bp_systolic_repeat >= 160 || step3_bp_diastolic_repeat >= 110) && (step3_urine_protein == '++' || step3_urine_protein == '+++' || step3_urine_protein == '++++')) || ((step3_urine_protein == '++' || step3_urine_protein == '+++' || step3_urine_protein == '++++') && (!step3_symp_sev_preeclampsia.isEmpty() && !step3_symp_sev_preeclampsia.contains('none')))" actions: - "calculation = 1" --- -name: step2_preeclampsia +name: step3_preeclampsia description: preeclampsia priority: 1 -condition: "((step2_urine_protein == '++' || step2_urine_protein == '+++' || step2_urine_protein == '++++') && (!step2_symp_sev_preeclampsia.isEmpty() && step2_symp_sev_preeclampsia.contains('none')) && (step2_bp_systolic_repeat < 160 && step2_bp_diastolic_repeat < 110))" +condition: "((step3_urine_protein == '++' || step3_urine_protein == '+++' || step3_urine_protein == '++++') && (!step3_symp_sev_preeclampsia.isEmpty() && step3_symp_sev_preeclampsia.contains('none')) && (step3_bp_systolic_repeat < 160 && step3_bp_diastolic_repeat < 110))" actions: - "calculation = 1" --- -name: step3_anaemic +name: step4_anaemic description: Anaemic priority: 1 -condition: "(global_hb_result != '' && global_hb_result < 11 && (global_gest_age_openmrs <= 12 || global_gest_age_openmrs >= 28)) || (global_hb_result != '' && global_hb_result < 10.5 && (global_gest_age_openmrs > 12 && global_gest_age_openmrs < 28)) || (global_hb_result == '' && step3_pallor == 'yes')" +condition: "(global_hb_result != '' && global_hb_result < 11 && (global_gest_age_openmrs <= 12 || global_gest_age_openmrs >= 28)) || (global_hb_result != '' && global_hb_result < 10.5 && (global_gest_age_openmrs > 12 && global_gest_age_openmrs < 28)) || (global_hb_result == '' && step4_pallor == 'yes')" actions: - "calculation = 1" --- -name: step4_preeclampsia_risk +name: step5_preeclampsia_risk description: Preeclampsia_risk priority: 1 -condition: "((global_prev_preg_comps != null && !global_prev_preg_comps.isEmpty() && (global_prev_preg_comps.contains('convulsions') || global_prev_preg_comps.contains('pre_eclampsia'))) || (global_health_conditions != null && !global_health_conditions.isEmpty() && (global_health_conditions.contains('autoimmune_disease') || global_health_conditions.contains('diabetes') || global_health_conditions.contains('gest_diabetes') || global_health_conditions.contains('diabetes_other') || global_health_conditions.contains('diabetes_type2') || global_health_conditions.contains('Hypertension') || global_health_conditions.contains('kidney_disease'))) || (step4_no_of_fetuses != null && step4_no_of_fetuses != '' && step4_no_of_fetuses >= 2))" +condition: "((global_prev_preg_comps != null && !global_prev_preg_comps.isEmpty() && (global_prev_preg_comps.contains('convulsions') || global_prev_preg_comps.contains('pre_eclampsia'))) || (global_health_conditions != null && !global_health_conditions.isEmpty() && (global_health_conditions.contains('autoimmune_disease') || global_health_conditions.contains('diabetes') || global_health_conditions.contains('gest_diabetes') || global_health_conditions.contains('diabetes_other') || global_health_conditions.contains('diabetes_type2') || global_health_conditions.contains('Hypertension') || global_health_conditions.contains('kidney_disease'))) || (step5_no_of_fetuses != null && step5_no_of_fetuses != '' && step5_no_of_fetuses >= 2))" actions: - "calculation = 1" --- -name: step3_toaster26_hidden +name: step4_toaster26_hidden description: toaster priority: 1 -condition: "step3_dilation_cm > 2" +condition: "step4_dilation_cm > 2" actions: - - 'calculation = step3_dilation_cm' + - 'calculation = step4_dilation_cm' --- -name: step3_ipv_suspect +name: step4_ipv_suspect description: ipv_suspect priority: 1 -condition: "(global_ipv_signs_symptoms != null && !global_ipv_signs_symptoms.isEmpty() && !global_ipv_signs_symptoms.contains('none')) || (step3_ipv_physical_signs_symptoms != null && !step3_ipv_physical_signs_symptoms.isEmpty() && !step3_ipv_physical_signs_symptoms.contains('none'))" +condition: "(global_ipv_signs_symptoms != null && !global_ipv_signs_symptoms.isEmpty() && !global_ipv_signs_symptoms.contains('none')) || (step4_ipv_physical_signs_symptoms != null && !step4_ipv_physical_signs_symptoms.isEmpty() && !step4_ipv_physical_signs_symptoms.contains('none'))" actions: - "calculation = 1" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/physical-exam-relevance-rules.yml b/opensrp-anc/src/main/assets/rule/physical-exam-relevance-rules.yml index a12961f83..8d141d002 100644 --- a/opensrp-anc/src/main/assets/rule/physical-exam-relevance-rules.yml +++ b/opensrp-anc/src/main/assets/rule/physical-exam-relevance-rules.yml @@ -1,141 +1,287 @@ --- -name: step2_toaster7 +name: step3_bp_systolic_optibp_label +description: BP Systolic OptiBP Label +priority: 1 +condition: "step3_bp_measurement_method.contains('optibp') && !step3_cant_record_bp_optibp.contains('cant_record_bp_optibp')" +actions: + - "isRelevant = true" +--- +name: step3_bp_systolic +description: BP Systolic OptiBP Value +priority: 1 +condition: "step3_bp_measurement_method.contains('optibp') && !step3_cant_record_bp_optibp.contains('cant_record_bp_optibp')" +actions: + - "isRelevant = true" +--- +name: step3_bp_diastolic_optibp_label +description: BP diastolic OptiBP Label +priority: 1 +condition: "step3_bp_measurement_method.contains('optibp') && !step3_cant_record_bp_optibp.contains('cant_record_bp_optibp')" +actions: + - "isRelevant = true" +--- +name: step3_bp_diastolic +description: BP diastolic OptiBP Value +priority: 1 +condition: "step3_bp_measurement_method.contains('optibp') && !step3_cant_record_bp_optibp.contains('cant_record_bp_optibp')" +actions: + - "isRelevant = true" +--- +name: step3_bp_systolic_manual_label +description: BP Systolic Manual Label +priority: 1 +condition: "(step3_bp_measurement_method.contains('manually')) + && !step3_cant_record_bp_manual.contains('cant_record_bp_manual')" +actions: + - "isRelevant = true" +--- +name: step3_bp_systolic_manual +description: BP Systolic Manual Value +priority: 1 +condition: "(step3_bp_measurement_method.contains('manually')) + && !step3_cant_record_bp_manual.contains('cant_record_bp_manual')" +actions: + - "isRelevant = true" +--- +name: step3_bp_diastolic_manual_label +description: BP Diastolic Manual Label +priority: 1 +condition: "(step3_bp_measurement_method.contains('manually')) + && !step3_cant_record_bp_manual.contains('cant_record_bp_manual')" +actions: + - "isRelevant = true" +--- +name: step3_bp_diastolic_manual +description: BP Diastolic Manual Value +priority: 1 +condition: "(step3_bp_measurement_method.contains('manually')) + && !step3_cant_record_bp_manual.contains('cant_record_bp_manual')" +actions: + - "isRelevant = true" +--- +name: step3_cant_record_bp_optibp +description: BP Can't Record (OptiBP) +priority: 1 +condition: "step3_bp_measurement_method.contains('optibp')" +actions: + - "isRelevant = true" +--- +name: step3_cant_record_bp_manual +description: BP Diastolic Value +priority: 1 +condition: "step3_bp_measurement_method.contains('manually')" +actions: + - "isRelevant = true" +--- +name: step3_record_bp_using_optibp_button +description: BP Measurement Widget +priority: 1 +condition: "step3_bp_measurement_method.contains('optibp') && !step3_cant_record_bp_optibp.contains('cant_record_bp_optibp')" +actions: + - "isRelevant = true" +--- +name: step3_cant_record_bp_reason +description: Cant record BP reason +priority: 1 +condition: "step3_bp_measurement_method.contains('manually') && step3_cant_record_bp_manual.contains('cant_record_bp_manual')" +actions: + - "isRelevant = true" +--- +name: step3_cant_record_bp_reason_opt +description: Cant record BP reason via OptiBP +priority: 1 +condition: "step3_bp_measurement_method.contains('optibp') && step3_cant_record_bp_optibp.contains('cant_record_bp_optibp')" +actions: + - "isRelevant = true" +--- +name: step3_bp_warning_manual +description: BP measurement warning toaster +priority: 1 +condition: "(step3_bp_systolic_manual >= 140 || step3_bp_diastolic_manual >= 90) + && step3_bp_measurement_method.contains('manually')" +actions: + - "isRelevant = true" +--- +name: step3_bp_warning_optibp description: BP measurement warning toaster priority: 1 -condition: "step2_bp_systolic >= 140 || step2_bp_diastolic >= 90" +condition: "(step3_bp_systolic >= 140 || step3_bp_diastolic >= 90) + && step3_bp_measurement_method.contains('optibp')" actions: - "isRelevant = true" --- -name: step2_bp_systolic_repeat_label +name: step3_bp_systolic_repeat_label description: BP measurement priority: 1 -condition: "step2_bp_systolic >= 140 || step2_bp_diastolic >= 90" +condition: "(step3_bp_systolic >= 140 || step3_bp_diastolic >= 90) + && (step3_bp_measurement_method.contains('optibp') || step3_bp_measurement_method.contains('manually'))" actions: - "isRelevant = true" --- -name: step2_bp_systolic_repeat +name: step3_bp_systolic_repeat description: BP measurement priority: 1 -condition: "step2_bp_systolic >= 140 || step2_bp_diastolic >= 90" +condition: "(step3_bp_systolic >= 140 || step3_bp_diastolic >= 90) + && (step3_bp_measurement_method.contains('optibp') || step3_bp_measurement_method.contains('manually'))" actions: - "isRelevant = true" --- -name: step2_bp_diastolic_repeat_label +name: step3_bp_diastolic_repeat_label description: BP measurement priority: 1 -condition: "step2_bp_systolic >= 140 || step2_bp_diastolic >= 90" +condition: "(step3_bp_systolic >= 140 || step3_bp_diastolic >= 90) + && (step3_bp_measurement_method.contains('optibp') || step3_bp_measurement_method.contains('manually'))" actions: - "isRelevant = true" --- -name: step2_bp_diastolic_repeat +name: step3_bp_diastolic_repeat description: BP measurement priority: 1 -condition: "step2_bp_systolic >= 140 || step2_bp_diastolic >= 90" +condition: "(step3_bp_systolic >= 140 || step3_bp_diastolic >= 90) + && (step3_bp_measurement_method.contains('optibp') || step3_bp_measurement_method.contains('manually'))" +actions: + - "isRelevant = true" +--- +name: step3_record_bp_using_optibp_2nd_reading_button +description: BP measurement method 2 +priority: 1 +condition: "(step3_bp_systolic >= 140 || step3_bp_diastolic >= 90) && step3_bp_measurement_method.contains('optibp')" actions: - "isRelevant = true" --- -name: step2_toaster8 +name: step3_toaster8 description: BP measurement warning toaster8 priority: 1 -condition: "step2_bp_systolic_repeat >= 140 || step2_bp_diastolic_repeat >= 90" +condition: "(step3_bp_systolic_repeat >= 140 || step3_bp_diastolic_repeat >= 90) + && (step3_bp_measurement_method.contains('optibp') || step3_bp_measurement_method.contains('manually'))" actions: - "isRelevant = true" --- -name: step2_symp_sev_preeclampsia +name: step3_symp_sev_preeclampsia description: Check if the woman has any of the following symptoms of severe pre-eclampsia. priority: 1 -condition: "step2_bp_systolic_repeat >= 140 || step2_bp_diastolic_repeat >= 90" +condition: "(step3_bp_systolic_repeat >= 140 || step3_bp_diastolic_repeat >= 90) + && (step3_bp_measurement_method.contains('optibp') || step3_bp_measurement_method.contains('manually'))" actions: - "isRelevant = true" --- -name: step2_urine_protein +name: step3_urine_protein description: Enter the result for the dipstick test - protein. priority: 1 -condition: "step2_bp_systolic_repeat >= 140 || step2_bp_diastolic_repeat >= 90" +condition: "(step3_bp_systolic_repeat >= 140 || step3_bp_diastolic_repeat >= 90) + && (step3_bp_measurement_method.contains('optibp') || step3_bp_measurement_method.contains('manually'))" actions: - "isRelevant = true" --- -name: step2_toaster9 +name: step3_toaster9 description: Hypertension diagnosis priority: 1 -condition: "step2_hypertension == 1" +condition: "step3_hypertension == 1" actions: - "isRelevant = true" --- -name: step3_toaster17 +name: step4_toaster17 description: Hypertension diagnosis priority: 1 -condition: "step3_pulse_rate > 0 && (step3_pulse_rate < 60 || step3_pulse_rate > 100)" +condition: "step4_pulse_rate > 0 && (step4_pulse_rate < 60 || step4_pulse_rate > 100)" actions: - "isRelevant = true" --- -name: step3_pulse_rate_repeat +name: step4_pulse_rate_repeat description: Pulse rate measurement priority: 1 -condition: "step3_pulse_rate > 0 && (step3_pulse_rate < 60 || step3_pulse_rate > 100)" +condition: "step4_pulse_rate > 0 && (step4_pulse_rate < 60 || step4_pulse_rate > 100)" actions: - "isRelevant = true" --- -name: step3_pulse_rate_repeat_label +name: step4_pulse_rate_repeat_label description: Pulse rate measurement priority: 1 -condition: "step3_pulse_rate > 0 && (step3_pulse_rate < 60 || step3_pulse_rate > 100) " +condition: "step4_pulse_rate > 0 && (step4_pulse_rate < 60 || step4_pulse_rate > 100) " actions: - "isRelevant = true" --- -name: step3_toaster18 +name: step4_toaster18 description: Pulse rate measurement priority: 1 -condition: "step3_pulse_rate_repeat > 0 && (step3_pulse_rate_repeat < 60 || step3_pulse_rate_repeat > 100) " +condition: "step4_pulse_rate_repeat > 0 && (step4_pulse_rate_repeat < 60 || step4_pulse_rate_repeat > 100) " actions: - "isRelevant = true" --- -name: step3_toaster21 +name: step4_toaster21 description: Oxymetry Entry priority: 1 -condition: "step3_oximetry > 0 && step3_oximetry < 92" +condition: "step4_oximetry > 0 && step4_oximetry < 92" +actions: + - "isRelevant = true" +--- +name: step4_respiratory_rate_label +description: RR +priority: 1 +condition: "step4_respiratory_exam == 2 || step4_respiratory_exam == 3" +actions: + - "isRelevant = true" +--- +name: step4_respiratory_rate +description: RR +priority: 1 +condition: "step4_respiratory_exam == 2 || step4_respiratory_exam == 3" +actions: + - "isRelevant = true" +--- +name: step5_sfh_label +description: SFH Label +priority: 1 +condition: "step5_sfh_measurement == 'done'" actions: - "isRelevant = true" --- -name: step4_toaster28 +name: step5_sfh +description: SFH Label +priority: 1 +condition: "step5_sfh_measurement == 'done'" +actions: + - "isRelevant = true" +--- +name: step5_toaster28 description: Fetal heart beat rate priority: 1 -condition: "(step4_fetal_heart_rate > 0 && (step4_fetal_heart_rate < 100 || step4_fetal_heart_rate > 180))" +condition: "(step5_fetal_heart_rate > 0 && (step5_fetal_heart_rate < 100 || step5_fetal_heart_rate > 180))" actions: - "isRelevant = true" --- -name: step4_fetal_movement +name: step5_fetal_movement description: Fetal movement priority: 1 condition: "(global_gest_age_openmrs != '' && global_gest_age_openmrs > 20)" actions: - "isRelevant = true" --- -name: step4_fetal_heart_rate_repeat_label +name: step5_fetal_heart_rate_repeat_label description: Fetal heart beat rate priority: 1 -condition: "(step4_fetal_heart_rate > 0 && (step4_fetal_heart_rate < 100 || step4_fetal_heart_rate > 180))" +condition: "(step5_fetal_heart_rate > 0 && (step5_fetal_heart_rate < 100 || step5_fetal_heart_rate > 180))" actions: - "isRelevant = true" --- -name: step4_fetal_heart_rate_repeat +name: step5_fetal_heart_rate_repeat description: Fetal heart beat rate priority: 1 -condition: "(step4_fetal_heart_rate > 0 && (step4_fetal_heart_rate < 100 || step4_fetal_heart_rate > 180))" +condition: "(step5_fetal_heart_rate > 0 && (step5_fetal_heart_rate < 100 || step5_fetal_heart_rate > 180))" actions: - "isRelevant = true" --- -name: step4_toaster27 +name: step5_toaster27 description: No fetal heartbeat observed. Refer to hospital. priority: 1 -condition: "(step4_fetal_heartbeat == 'no' && (global_gest_age_openmrs != '' && global_gest_age_openmrs > 20))" +condition: "(step5_fetal_heartbeat == 'no' && (global_gest_age_openmrs != '' && global_gest_age_openmrs >= 16))" actions: - "isRelevant = true" --- -name: step4_toaster29 +name: step5_toaster29 description: Fetal heart beat rate repeat toaster priority: 1 -condition: "(step4_fetal_heart_rate_repeat > 0 && (step4_fetal_heart_rate_repeat < 100 || step4_fetal_heart_rate_repeat > 180))" +condition: "(step5_fetal_heart_rate_repeat > 0 && (step5_fetal_heart_rate_repeat < 100 || step5_fetal_heart_rate_repeat > 180))" actions: - "isRelevant = true" --- @@ -149,146 +295,167 @@ actions: name: step1_toaster5 description: Note displaying that counseling on increasing daily energy and protein intake should be given. priority: 1 -condition: "global_pop_undernourish == true && step1_weight_cat == 'Underweight'" +condition: "global_pop_undernourish == true && step1_weight_cat == helper.weightIMT('Underweight')" actions: - "isRelevant = true" --- name: step1_toaster6 description: Note displaying that counseling on balanced energy and protein dietary supplementation should be given. priority: 1 -condition: "global_pop_undernourish == true && step1_weight_cat == 'Underweight'" +condition: "global_pop_undernourish == true && step1_weight_cat == helper.weightIMT('Underweight')" +actions: + - "isRelevant = true" +--- +name: step2_muac_toaster_malnourished +description: Note displaying the woman's nutritional status based on MUAC. +priority: 1 +condition: "step2_muac < 23.5 && step2_muac != 0" +actions: + - "isRelevant = true" +--- +name: step2_muac_toaster_nourished +description: Note displaying the woman's nutritional status based on MUAC. +priority: 1 +condition: "step2_muac >= 23.5 && step2_muac <= 40 && step2_muac != 0" +actions: + - "isRelevant = true" +--- +name: step2_muac_toaster_abnormal +description: Note displaying the woman's nutritional status based on MUAC. +priority: 1 +condition: "step2_muac > 40" actions: - "isRelevant = true" --- -name: step2_toaster10 +name: step3_toaster10 description: Severe hypertension toaster` priority: 1 -condition: "step2_severe_hypertension == 1" +condition: "step3_severe_hypertension == 1" actions: - "isRelevant = true" --- -name: step2_toaster11 +name: step3_toaster11 description: Note displaying that the woman has severe pre-eclampsia. priority: 1 -condition: "(step2_hypertension == 1 && !step2_symp_sev_preeclampsia.isEmpty() && !step2_symp_sev_preeclampsia.contains('none'))" +condition: "(step3_hypertension == 1 && !step3_symp_sev_preeclampsia.isEmpty() && !step3_symp_sev_preeclampsia.contains('none'))" actions: - "isRelevant = true" --- -name: step2_toaster13 +name: step3_toaster13 description: Note displaying that the woman has severe pre-eclampsia. priority: 1 -condition: "(step2_severe_preeclampsia == 1)" +condition: "(step3_severe_preeclampsia == 1)" actions: - "isRelevant = true" --- -name: step2_toaster14 +name: step3_toaster14 description: Note displaying that the woman has severe pre-eclampsia. priority: 1 -condition: "(step2_preeclampsia == 1)" +condition: "(step3_preeclampsia == 1)" actions: - "isRelevant = true" --- -name: step3_toaster19 +name: step4_toaster19 description: Note displaying that anaemic priority: 1 -condition: "(step3_anaemic == 1)" +condition: "(step4_anaemic == 1)" actions: - "isRelevant = true" --- -name: step4_toaster30 +name: step5_toaster30 description: Note displaying that preeclampsia risk priority: 1 -condition: "(step4_preeclampsia_risk == 1)" +condition: "(step5_preeclampsia_risk == 1)" actions: - "isRelevant = true" --- -name: step4_fetal_presentation +name: step5_fetal_presentation description: Fetal movement priority: 1 condition: "(global_gest_age_openmrs != '' && global_gest_age_openmrs >= 28)" actions: - "isRelevant = true" --- -name: step3_toaster22 +name: step4_toaster22 description: toaster22 priority: 1 -condition: "step3_cardiac_exam == 3" +condition: "step4_cardiac_exam == 3" actions: - "isRelevant = true" --- -name: step3_toaster23 +name: step4_toaster23 description: toaster23 priority: 1 -condition: "step3_breast_exam == 3" +condition: "step4_breast_exam == 3" actions: - "isRelevant = true" --- -name: step3_toaster24 +name: step4_toaster24 description: toaster24 priority: 1 -condition: "step3_abdominal_exam == 3" +condition: "step4_abdominal_exam == 3" actions: - "isRelevant = true" --- -name: step3_toaster25 +name: step4_toaster25 description: toaster25 priority: 1 -condition: "step3_pelvic_exam == 3" +condition: "step4_pelvic_exam == 3" actions: - "isRelevant = true" --- -name: step3_toaster26 +name: step4_toaster26 description: toaster26 priority: 1 -condition: "step3_toaster26_hidden > 2" +condition: "step4_toaster26_hidden > 2 && step4_cervical_exam == '1'" actions: - "isRelevant = true" --- -name: step3_evaluate_labour_toaster +name: step4_evaluate_labour_toaster description: evaluate_labour_toaster priority: 1 -condition: "!step3_pelvic_exam_abnormal.isEmpty() && step3_pelvic_exam_abnormal.contains('amniotic_fluid_evidence')" +condition: "!step4_pelvic_exam_abnormal.isEmpty() && step4_pelvic_exam_abnormal.contains('amniotic_fluid_evidence')" actions: - "isRelevant = true" --- -name: step3_ipv_physical_signs_symptoms +name: step4_ipv_physical_signs_symptoms description: ipv_physical_signs_symptoms priority: 1 condition: "global_site_ipv_assess == true" actions: - "isRelevant = true" --- -name: step3_toaster31 +name: step4_toaster31 description: toaster31 priority: 1 -condition: "step3_ipv_suspect == 1 " +condition: "step4_ipv_suspect == 1 " actions: - "isRelevant = true" --- -name: step3_ipv_clinical_enquiry +name: step4_ipv_clinical_enquiry description: ipv_clinical_enquiry priority: 1 -condition: "step3_ipv_suspect == 1" +condition: "step4_ipv_suspect == 1" actions: - "isRelevant = true" --- -name: step3_ipv_clinical_enquiry_not_done_reason +name: step4_ipv_clinical_enquiry_not_done_reason description: ipv_clinical_enquiry_not_done_reason priority: 1 -condition: "step3_ipv_clinical_enquiry == 'no'" +condition: "step4_ipv_clinical_enquiry == 'no'" actions: - "isRelevant = true" --- -name: step3_ipv_subject +name: step4_ipv_subject description: ipv_subject priority: 1 -condition: "step3_ipv_clinical_enquiry == 'yes'" +condition: "step4_ipv_clinical_enquiry == 'yes'" actions: - "isRelevant = true" --- -name: step3_ipv_subject_violence_types +name: step4_ipv_subject_violence_types description: ipv_subject priority: 1 -condition: "step3_ipv_subject == 'yes'" +condition: "step4_ipv_subject == 'yes'" actions: - "isRelevant = true" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/profile_calculation_rules.yml b/opensrp-anc/src/main/assets/rule/profile_calculation_rules.yml index 2954e3e63..d9fedbc16 100644 --- a/opensrp-anc/src/main/assets/rule/profile_calculation_rules.yml +++ b/opensrp-anc/src/main/assets/rule/profile_calculation_rules.yml @@ -12,7 +12,7 @@ description: step2_lmp_known_date priority: 1 condition: "step2_lmp_known == 'yes'" actions: - - "calculation = helper.getDateToday()" + - "calculation = helper.getSecondaryValue(step2_lmp_known_date)" --- name: step2_lmp_edd description: LMP EDD @@ -26,7 +26,7 @@ description: LMP Gest age priority: 1 condition: "step2_lmp_known == 'yes'" actions: - - "calculation = helper.getWeeksAndDaysFromDays(helper.getDifferenceDays(helper.getSecondaryValue(step2_lmp_known_date)))" + - "calculation = helper.getWeeksAndDaysFromDays(helper.getDifferenceDays(helper.getSecondaryValue(step2_lmp_known_date), helper.getSecondaryValue(global_visit_date)))" --- name: step2_ultrasound_gest_age_concept description: Ultrasound Gest age concept @@ -40,35 +40,35 @@ description: step2_ultrasound_done_date priority: 1 condition: "step2_ultrasound_done == 'yes'" actions: - - "calculation = helper.getDateToday()" + - "calculation = helper.getSecondaryValue(step2_ultrasound_done_date)" --- name: step2_ultrasound_edd description: Ultrasound edd priority: 1 condition: "step2_ultrasound_gest_age_wks != ''" actions: - - "calculation = helper.addDuration(helper.getSecondaryValue(step2_ultrasound_done_date), ( (280 - ( (new Integer(step2_ultrasound_gest_age_wks) * 7) + new Integer(step2_ultrasound_gest_age_days != '' ? step2_ultrasound_gest_age_days : 0)) ) +'d'))" + - "calculation = helper.addDuration(helper.getSecondaryValue(global_visit_date), ( (280 - ( (new Integer(step2_ultrasound_gest_age_wks) * 7) + new Integer(step2_ultrasound_gest_age_days != '' ? step2_ultrasound_gest_age_days : 0)) ) +'d'))" --- name: step2_ultrasound_gest_age description: Ultrasound Gest age priority: 1 condition: "step2_ultrasound_done== 'yes'" actions: - - "calculation = helper.getWeeksAndDaysFromDays( 280 - helper.getDifferenceDays(helper.getSecondaryValue(step2_ultrasound_edd)) - 1 )" + - "calculation = helper.getWeeksAndDaysFromDays( helper.getDifferenceDays(helper.getSecondaryValue(step2_ultrasound_done_date), helper.getSecondaryValue(global_visit_date)) + (new Integer(step2_ultrasound_gest_age_wks) * 7) + (new Integer(step2_ultrasound_gest_age_days != '' ? step2_ultrasound_gest_age_days : 0)) )" --- name: step2_sfh_edd description: SFH edd priority: 1 condition: "step2_sfh_gest_age > 0" actions: - - "calculation = helper.addDuration((280 - (step2_sfh_gest_age * 7)) + 'd')" + - "calculation = helper.addDuration(helper.getSecondaryValue(global_visit_date), (280 - (step2_sfh_gest_age * 7)) + 'd')" --- name: step2_sfh_ga_hidden description: SFH edd priority: 1 condition: "true" actions: - - "calculation = step2_sfh_gest_age > 0 ? step2_sfh_gest_age + ' weeks' : 0" + - "calculation = step2_sfh_gest_age > 0 ? helper.getWeeksAndDaysFromDays(step2_sfh_gest_age * 7) : 0" --- name: step2_lmp_gest_age_selection description: Gest age @@ -89,7 +89,7 @@ description: Gest age priority: 1 condition: "true" actions: - - "calculation = ['sfh_gest_age':step2_sfh_ga_hidden,'sfh_edd':step2_sfh_edd]" + - "calculation = ['sfh_gest_age': step2_sfh_ga_hidden, 'sfh_edd': step2_sfh_edd]" --- name: step2_lmp_ultrasound_gest_age_selection description: Gest age @@ -182,6 +182,13 @@ condition: "(global_bmi != null && global_bmi != '' && global_bmi >= 30) || (!st actions: - "calculation = 1" --- +name: step3_gdm_risk_value +description: gdm_risk_value +priority: 1 +condition: "(global_bmi != null && global_bmi != '' && global_bmi >= 30) || (!step3_prev_preg_comps.isEmpty() && (step3_prev_preg_comps.contains('gestational_diabetes') || step3_prev_preg_comps.contains('macrosomia'))) || (global_urine_glucose != null && global_urine_glucose != '' && (global_urine_glucose == '++' || global_urine_glucose == '+++' || global_urine_glucose == '++++'))" +actions: + - "calculation = 1" +--- name: step4_preeclampsia_risk description: preeclampsia_risk priority: 1 diff --git a/opensrp-anc/src/main/assets/rule/profile_constraint_rules.yml b/opensrp-anc/src/main/assets/rule/profile_constraint_rules.yml index 33854b044..775d40a81 100644 --- a/opensrp-anc/src/main/assets/rule/profile_constraint_rules.yml +++ b/opensrp-anc/src/main/assets/rule/profile_constraint_rules.yml @@ -4,25 +4,25 @@ description: miscarriage abortions number selectors priority: 1 condition: "true" actions: -- "constraint = step3_previous_pregnancies + 1" + - "constraint = step3_previous_pregnancies + 1" --- name: step3_live_births description: live births number selectors priority: 1 condition: "true" actions: -- "constraint = (step3_previous_pregnancies - step3_miscarriages_abortions) + 1" + - "constraint = (step3_previous_pregnancies - step3_miscarriages_abortions) + 1" --- name: step3_stillbirths description: Still birth number selector priority: 1 condition: "true" actions: -- "constraint = (step3_previous_pregnancies - step3_miscarriages_abortions- step3_live_births) + 1" + - "constraint = (step3_previous_pregnancies - step3_miscarriages_abortions- step3_live_births) + 1" --- name: step3_c_sections description: C -Sections number selector priority: 1 condition: "true" actions: -- "constraint = step3_parity + 1" + - "constraint = step3_parity + 1" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/profile_relevance_rules.yml b/opensrp-anc/src/main/assets/rule/profile_relevance_rules.yml index 54d5bafdf..61623222c 100644 --- a/opensrp-anc/src/main/assets/rule/profile_relevance_rules.yml +++ b/opensrp-anc/src/main/assets/rule/profile_relevance_rules.yml @@ -23,7 +23,7 @@ actions: name: step2_sfh_gest_age description: sfh_gest_age priority: 1 -condition: "(step2_lmp_known == 'no' && step2_ultrasound_done == 'no') || (step2_lmp_known == 'no' && step2_ultrasound_gest_age_wks >= 24)" +condition: "(step2_lmp_known == 'no' && step2_ultrasound_done == 'no')" actions: - "isRelevant = true" --- @@ -44,7 +44,7 @@ actions: name: step2_sfh_gest_age_selection description: sfh_gest_age_selection priority: 1 -condition: "step2_lmp_known == '' || step2_ultrasound_done == '' || (step2_lmp_known == 'no' && step2_ultrasound_done == 'no')" +condition: "(step2_lmp_known == 'no' && step2_ultrasound_done == 'no')" actions: - "isRelevant = true" --- @@ -175,8 +175,8 @@ actions: - "isRelevant = true" --- name: step1_headss_toaster -description: HEADSS info +description: Headss Toaster priority: 1 condition: "(global_age < 19)" actions: - - "isRelevant = true" + - "isRelevant = true" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/quick_check_relevance_rules.yml b/opensrp-anc/src/main/assets/rule/quick_check_relevance_rules.yml deleted file mode 100644 index a3fda7759..000000000 --- a/opensrp-anc/src/main/assets/rule/quick_check_relevance_rules.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: step1_danger_signs -description: danger_signs -priority: 1 -condition: "!step1_contact_reason.isEmpty()" -actions: - - "isRelevant = true" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/sf_relevance_rules.yml b/opensrp-anc/src/main/assets/rule/sf_relevance_rules.yml index 7881e6941..b692c6efa 100644 --- a/opensrp-anc/src/main/assets/rule/sf_relevance_rules.yml +++ b/opensrp-anc/src/main/assets/rule/sf_relevance_rules.yml @@ -131,7 +131,7 @@ description: Intimate Partner Violence(IPV) priority: 1 condition: "global_site_ipv_assess == true" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step4_toaster23 description: Intimate Partner Violence(IPV) Toaster diff --git a/opensrp-anc/src/main/assets/rule/tests_calculation_rules.yml b/opensrp-anc/src/main/assets/rule/tests_calculation_rules.yml index b536d51ea..7f7aa1b8c 100644 --- a/opensrp-anc/src/main/assets/rule/tests_calculation_rules.yml +++ b/opensrp-anc/src/main/assets/rule/tests_calculation_rules.yml @@ -271,26 +271,3 @@ priority: 1 condition: "step2_hb_test_status != '' && step2_hb_test_status == 'done_today'" actions: - "calculation = helper.getDateToday()" ---- -name: step1_covid_positive -description: covid_positive -priority: 1 -condition: "(step1_covid_pcr_test == 'positive') || (step1_covid_antigen_test == 'positive') || (step1_covid_igg_test == 'positive') || (step1_covid_igm_test == 'positive')" -actions: - - "calculation = 1" ---- -name: step1_covid_date_today_hidden -description: Covid_test_date -priority: 1 -condition: "step1_covid_status != '' && step1_covid_status == 'done_today'" -actions: - - "calculation = helper.getDateToday()" ---- -name: step1_toxo_test_date -description: toxo_test_date -priority: 1 -condition: "step1_toxo_test_status == 'done_today'" -actions: - - "calculation = helper.getDateToday()" - - diff --git a/opensrp-anc/src/main/assets/rule/tests_expansion_panel_relevance_rules.yml b/opensrp-anc/src/main/assets/rule/tests_expansion_panel_relevance_rules.yml index be15ea76c..1f9555192 100644 --- a/opensrp-anc/src/main/assets/rule/tests_expansion_panel_relevance_rules.yml +++ b/opensrp-anc/src/main/assets/rule/tests_expansion_panel_relevance_rules.yml @@ -30,7 +30,7 @@ actions: name: step1_accordion_hepatitis_c description: Hepatitis C test priority: 1 -condition: "helper.getValueFromAccordion('accordion_hiv', 'step1_hiv_positive') == '1' || global_alcohol_substance_use.contains('injectable_drugs') || global_occupation.contains('informal_employment_sex_worker') || global_previous_hepc_test_status.contains('') || global_previous_hepc_test_status.contains('not_done') || global_previous_hepc_test_status.contains ('ordered')" +condition: "((helper.getValueFromAccordion('accordion_hiv', 'step1_hiv_positive') == '1' || global_pop_hepc == true || (!global_alcohol_substance_use.isEmpty() && global_alcohol_substance_use.contains('injectable_drugs')) || (!global_occupation.isEmpty() && global_occupation.contains('informal_employment_sex_worker')))) && (global_contact_no == 1 || (global_contact_no > 1 && (global_previous_hepc_test_status == '' || global_previous_hepc_test_status == 'not_done' || global_previous_hepc_test_status == 'ordered')))" actions: - "isRelevant = true" --- @@ -100,7 +100,7 @@ actions: name: step2_accordion_partner_hiv description: Partner HIV test priority: 1 -condition: "global_partner_hiv_status.contains('dont_know') || global_partner_hiv_status == ''" +condition: "(global_partner_hiv_status == 'dont_know' || global_partner_hiv_status == '') && (global_contact_no == 1 || (global_contact_no > 1 && ((global_previous_hiv_test_partner_status == 'done_earlier' || global_previous_hiv_test_partner_status == 'done_today') && global_previous_hiv_test_partner_result == 'inconclusive') || global_previous_hiv_test_partner_status == ''))" actions: - "isRelevant = true" --- @@ -111,7 +111,6 @@ condition: "global_contact_no == 1 || (global_contact_no > 1 && (global_previous actions: - "isRelevant = true" --- - name: step2_accordion_blood_type description: step2 blood type accordion priority: 1 @@ -130,19 +129,5 @@ name: step2_accordion_blood_haemoglobin description: hb_test_status priority: 1 condition: "(global_contact_no > 1 && (global_previous_hb_test_status != '' && (global_previous_hb_test_status == 'done_earlier' || global_previous_hb_test_status == 'done_today')))" -actions: - - "isRelevant = true" ---- -name: step2_accordion_covid-19 -description: accordion_covid-19 -priority: 1 -condition: "1 == 1" -actions: - - "isRelevant = true" ---- -name: step2_accordion_toxo -description: accordion_covid-19 -priority: 1 -condition: "1 == 1" actions: - "isRelevant = true" \ No newline at end of file diff --git a/opensrp-anc/src/main/assets/rule/tests_relevance_rules.yml b/opensrp-anc/src/main/assets/rule/tests_relevance_rules.yml index 2f139666b..023cba9fb 100644 --- a/opensrp-anc/src/main/assets/rule/tests_relevance_rules.yml +++ b/opensrp-anc/src/main/assets/rule/tests_relevance_rules.yml @@ -4,1217 +4,1068 @@ description: Date that the ultrasound was done. priority: 1 condition: "step1_hiv_test_status != '' && step1_hiv_test_status == 'done_earlier' " actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_test_date description: Date that the ultrasound was done. priority: 1 condition: "step2_hiv_test_status != '' && step2_hiv_test_status == 'done_earlier' " actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hiv_test_notdone description: HIV not done priority: 1 condition: "step1_hiv_test_status != '' && step1_hiv_test_status == 'not_done' " actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_test_notdone description: HIV not done. priority: 1 condition: "step2_hiv_test_status != '' && step2_hiv_test_status == 'not_done' " actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hiv_test_notdone_other description: Reason priority: 1 condition: "!step1_hiv_test_notdone.isEmpty() && step1_hiv_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_test_notdone_other description: Reason priority: 1 condition: "!step2_hiv_test_notdone.isEmpty() && step2_hiv_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hiv_inconclusive_toaster description: HIV test resupt priority: 1 condition: "step1_hiv_test_result != '' && step1_hiv_test_result == 'inconclusive'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_inconclusive_toaster description: HIV test resupt priority: 1 condition: "step2_hiv_test_result != '' && step2_hiv_test_result == 'inconclusive'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hiv_test_result description: HIV test result priority: 1 condition: "step1_hiv_test_status != '' && (step1_hiv_test_status == 'done_today' || step1_hiv_test_status == 'done_earlier') " actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_test_result description: HIV test result priority: 1 condition: "step2_hiv_test_status != '' && (step2_hiv_test_status == 'done_today' || step2_hiv_test_status == 'done_earlier') " actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hiv_positive_toaster description: HIV positive counseling priority: 1 condition: "(step1_hiv_positive == 1)" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_positive_toaster description: HIV positive counseling priority: 1 condition: "(step2_hiv_positive == 1)" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_test_partner_date description: Partner HIV test date priority: 1 condition: "(step2_hiv_test_partner_status != '' && step2_hiv_test_partner_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_test_partner_result description: partner HIV result priority: 1 condition: "step2_hiv_test_partner_status != '' && (step2_hiv_test_partner_status == 'done_today' || step2_hiv_test_partner_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hiv_risk_toaster description: hiv_risk_toaster priority: 1 condition: "step2_hiv_risk == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepb_test_notdone description: Reason priority: 1 condition: "step1_hepb_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepb_test_notdone description: Reason priority: 1 condition: "step2_hepb_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepb_test_notdone_other description: Reason priority: 1 condition: "!step1_hepb_test_notdone.isEmpty() && step1_hepb_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepb_test_notdone_other description: Reason priority: 1 condition: "!step2_hepb_test_notdone.isEmpty() && step2_hepb_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepb_test_date description: Hep B test date priority: 1 condition: "(step1_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepb_test_date description: Hep B test date priority: 1 condition: "(step2_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepb_test_type description: Hep B test type priority: 1 condition: "(step1_hepb_test_status == 'done_today' || step1_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepb_test_type description: Hep B test type priority: 1 condition: "(step2_hepb_test_status == 'done_today' || step2_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hbsag_lab_ima description: HBsAg laboratory-based immunoassay (recommended) priority: 1 condition: "(step1_hepb_test_type == 'hbsag_lab_based' && step1_hepb_test_status == 'done_today') || (step1_hepb_test_type == 'hbsag_lab_based' && step1_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hbsag_lab_ima description: HBsAg laboratory-based immunoassay (recommended) priority: 1 condition: "(step2_hepb_test_type == 'hbsag_lab_based' && step2_hepb_test_status == 'done_today') || (step2_hepb_test_type == 'hbsag_lab_based' && step2_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hbsag_rdt description: HBsAg rapid diagnostic test (RDT) priority: 1 condition: "(step1_hepb_test_type == 'hbsag_rdt' && step1_hepb_test_status == 'done_today') || (step1_hepb_test_type == 'hbsag_rdt' && step1_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hbsag_rdt description: HBsAg rapid diagnostic test (RDT) priority: 1 condition: "(step2_hepb_test_type == 'hbsag_rdt' && step2_hepb_test_status == 'done_today') || (step2_hepb_test_type == 'hbsag_rdt' && step2_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hbsag_dbs description: Dried Blood Spot (DBS) HBsAg test priority: 1 condition: "(step1_hepb_test_type == 'hbsag_dbs' && step1_hepb_test_status == 'done_today') || (step1_hepb_test_type == 'hbsag_dbs' && step1_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hbsag_dbs description: Dried Blood Spot (DBS) HBsAg test priority: 1 condition: "(step2_hepb_test_type == 'hbsag_dbs' && step2_hepb_test_status == 'done_today') || (step2_hepb_test_type == 'hbsag_dbs' && step2_hepb_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepatitis_b_danger_toaster description: Hep B positive diagnosis! priority: 1 condition: "step1_hepb_positive == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepatitis_b_danger_toaster description: Hep B positive diagnosis! priority: 1 condition: "step2_hepb_positive == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepatitis_b_info_toaster description: Hep B vaccination required priority: 1 condition: "step1_hepb_positive == 0" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepatitis_b_info_toaster description: Hep B vaccination required priority: 1 condition: "step2_hepb_positive == 0" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepc_test_notdone description: Reason priority: 1 condition: "step1_hepc_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepc_test_notdone description: Reason priority: 1 condition: "step2_hepc_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepc_test_date description: Hep C test date priority: 1 condition: "(step1_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepc_test_date description: Hep C test date priority: 1 condition: "(step2_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepc_test_type description: Hep C test type priority: 1 condition: "(step1_hepc_test_status == 'done_today' || step1_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepc_test_type description: Hep C test type priority: 1 condition: "(step2_hepc_test_status == 'done_today' || step2_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hcv_lab_ima description: Anti-HCV laboratory-based immunoassay (recommended) priority: 1 condition: "(step1_hepc_test_type == 'anti_hcv_lab_based' && step1_hepc_test_status == 'done_today') || (step1_hepc_test_type == 'anti_hcv_lab_based' && step1_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hcv_lab_ima description: Anti-HCV laboratory-based immunoassay (recommended) priority: 1 condition: "(step2_hepc_test_type == 'anti_hcv_lab_based' && step2_hepc_test_status == 'done_today') || (step2_hepc_test_type == 'anti_hcv_lab_based' && step2_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hcv_rdt description: Anti-HCV rapid diagnostic test (RDT) priority: 1 condition: "(step1_hepc_test_type == 'anti_hcv_rdt' && step1_hepc_test_status == 'done_today') || (step1_hepc_test_type == 'anti_hcv_rdt' && step1_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hcv_rdt description: Anti-HCV rapid diagnostic test (RDT) priority: 1 condition: "(step2_hepc_test_type == 'anti_hcv_rdt' && step2_hepc_test_status == 'done_today') || (step2_hepc_test_type == 'anti_hcv_rdt' && step2_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hcv_dbs description: Dried Blood Spot (DBS) anti-HCV test priority: 1 condition: "(step1_hepc_test_type == 'anti_hcv_dbs' && step1_hepc_test_status == 'done_today') || (step1_hepc_test_type == 'anti_hcv_dbs' && step1_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hcv_dbs description: Dried Blood Spot (DBS) anti-HCV test priority: 1 condition: "(step2_hepc_test_type == 'anti_hcv_dbs' && step2_hepc_test_status == 'done_today') || (step2_hepc_test_type == 'anti_hcv_dbs' && step2_hepc_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepc_test_notdone_other description: Reason priority: 1 condition: "!step1_hepc_test_notdone.isEmpty() && step1_hepc_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepc_test_notdone_other description: Reason priority: 1 condition: "!step1_hepc_test_notdone.isEmpty() && step1_hepc_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hepatitis_c_danger_toaster description: Counselling and referral required. priority: 1 condition: "step1_hepc_positive == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hepatitis_c_danger_toaster description: Counselling and referral required. priority: 1 condition: "step2_hepc_positive == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_syphilis_greater_5_toaster description: syphilis_greater_5_toaster priority: 1 condition: "global_pop_syphilis == true && global_pop_syphilis != ''" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_syphilis_greater_5_toaster description: syphilis_greater_5_toaster priority: 1 condition: "global_pop_syphilis == true && global_pop_syphilis != ''" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_syphilis_below_5_toaster description: syphilis_below_5_toaster priority: 1 condition: "global_pop_syphilis == false && global_pop_syphilis != ''" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_syphilis_below_5_toaster description: syphilis_below_5_toaster priority: 1 condition: "global_pop_syphilis == false && global_pop_syphilis != ''" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_syph_test_notdone description: Reason priority: 1 condition: "step1_syph_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_syph_test_notdone description: Reason priority: 1 condition: "step2_syph_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_syph_test_notdone_other description: Specify priority: 1 condition: "step1_syph_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_syph_test_notdone_other description: Specify priority: 1 condition: "step2_syph_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_syphilis_test_date description: Syphilis test date priority: 1 condition: "step1_syph_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_syphilis_test_date description: Syphilis test date priority: 1 condition: "step2_syph_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_syph_test_type description: Syphilis test type priority: 1 condition: "step1_syph_test_status == 'done_today' || step1_syph_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_syph_test_type description: Syphilis test type priority: 1 condition: "step2_syph_test_status == 'done_today' || step2_syph_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_rapid_syphilis_test description: Rapid syphilis test (RST) priority: 1 -condition: "((step1_syph_test_status == 'done_today' || step1_syph_test_status == 'done_earlier') && step1_syph_test_type.contains('rapid_syphilis'))" +condition: "((step1_syph_test_status == 'done_today' || step1_syph_test_status == 'done_earlier') && step1_syph_test_type == 'rapid_syphilis')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_rapid_syphilis_test description: Rapid syphilis test (RST) priority: 1 -condition: "((step2_syph_test_status == 'done_today' || step2_syph_test_status == 'done_earlier') && step2_syph_test_type.contains('rapid_syphilis'))" +condition: "((step2_syph_test_status == 'done_today' || step2_syph_test_status == 'done_earlier') && step2_syph_test_type == 'rapid_syphilis')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_rpr_syphilis_test description: Rapid plasma reagin (RPR) test priority: 1 -condition: "((step1_syph_test_status == 'done_today' || step1_syph_test_status == 'done_earlier') && step1_syph_test_type.contains('rapid_plasma'))" +condition: "((step1_syph_test_status == 'done_today' || step1_syph_test_status == 'done_earlier') && step1_syph_test_type == 'rapid_plasma')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_rpr_syphilis_test description: Rapid plasma reagin (RPR) test priority: 1 -condition: "((step2_syph_test_status == 'done_today' || step2_syph_test_status == 'done_earlier') && step2_syph_test_type.contains('rapid_plasma'))" +condition: "((step2_syph_test_status == 'done_today' || step2_syph_test_status == 'done_earlier') && step2_syph_test_type == 'rapid_plasma')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_lab_syphilis_test description: Off-site lab test for syphilis priority: 1 -condition: "((step1_syph_test_status == 'done_today' || step1_syph_test_status == 'done_earlier') && step1_syph_test_type.contains('off_site_lab'))" +condition: "((step1_syph_test_status == 'done_today' || step1_syph_test_status == 'done_earlier') && step1_syph_test_type == 'off_site_lab')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_lab_syphilis_test description: Off-site lab test for syphilis priority: 1 -condition: "((step2_syph_test_status == 'done_today' || step2_syph_test_status == 'done_earlier') && step2_syph_test_type.contains('off_site_lab'))" +condition: "((step2_syph_test_status == 'done_today' || step2_syph_test_status == 'done_earlier') && step2_syph_test_type == 'off_site_lab')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_syphilis_danger_toaster description: Syphilis test positive priority: 1 condition: "step1_syphilis_positive == 1" -actions: -- "isRelevant = true" ---- - -name: step1_syphilis_positive_and_pencillin_allergy_toaster -description: Syphilis test positive -priority: 1 -condition: "step1_syphilis_positive == 1" actions: - "isRelevant = true" --- - name: step2_syphilis_danger_toaster description: Syphilis test positive priority: 1 condition: "step2_syphilis_positive == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_test_notdone description: Reason priority: 1 condition: "step1_urine_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_test_notdone description: Reason priority: 1 condition: "step2_urine_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_test_notdone_other description: Specify priority: 1 condition: "step1_urine_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_test_notdone_other description: Specify priority: 1 condition: "step2_urine_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_test_date description: Urine test date priority: 1 condition: "step1_urine_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_test_date description: Urine test date priority: 1 condition: "step2_urine_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_test_type description: Urine test type priority: 1 condition: "step1_urine_test_status == 'done_today' || step1_urine_test_status == 'done_earlier' || step1_urine_test_status == 'ordered'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_test_type description: Urine test type priority: 1 condition: "step2_urine_test_status == 'done_today' || step2_urine_test_status == 'done_earlier' || step2_urine_test_status == 'ordered'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_culture description: Midstream urine culture (recommended) priority: 1 condition: "(step1_urine_test_status == 'done_today' || step1_urine_test_status == 'done_earlier') && step1_urine_test_type.contains('midstream_urine_culture')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_culture description: Midstream urine culture (recommended) priority: 1 condition: "(step2_urine_test_status == 'done_today' || step2_urine_test_status == 'done_earlier') && step2_urine_test_type.contains('midstream_urine_culture')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_gram_stain description: Midstream urine Gram-staining priority: 1 condition: "(step1_urine_test_status == 'done_today' || step1_urine_test_status == 'done_earlier') && step1_urine_test_type.contains('midstream_urine_gram')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_gram_stain description: Midstream urine Gram-staining priority: 1 condition: "(step2_urine_test_status == 'done_today' || step2_urine_test_status == 'done_earlier') && step2_urine_test_type.contains('midstream_urine_gram')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_nitrites description: Urine dipstick result - nitrites priority: 1 condition: "(step1_urine_test_status == 'done_today' || step1_urine_test_status == 'done_earlier') && step1_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_nitrites description: Urine dipstick result - nitrites priority: 1 condition: "(step2_urine_test_status == 'done_today' || step2_urine_test_status == 'done_earlier') && step2_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_leukocytes description: Urine dipstick result - leukocytes priority: 1 condition: "(step1_urine_test_status == 'done_today' || step1_urine_test_status == 'done_earlier') && step1_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_leukocytes description: Urine dipstick result - leukocytes priority: 1 condition: "(step2_urine_test_status == 'done_today' || step2_urine_test_status == 'done_earlier') && step2_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_protein description: Urine dipstick result - protein priority: 1 condition: "(step1_urine_test_status == 'done_today' || step1_urine_test_status == 'done_earlier') && step1_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_protein description: Urine dipstick result - protein priority: 1 condition: "(step2_urine_test_status == 'done_today' || step2_urine_test_status == 'done_earlier') && step2_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_urine_glucose description: Urine dipstick result - glucose priority: 1 condition: "(step1_urine_test_status == 'done_today' || step1_urine_test_status == 'done_earlier') && step1_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_urine_glucose description: Urine dipstick result - glucose priority: 1 condition: "(step2_urine_test_status == 'done_today' || step2_urine_test_status == 'done_earlier') && step2_urine_test_type.contains('urine_dipstick')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_gdm_risk_toaster description: Gestational diabetes mellitus (GDM) risk counseling priority: 1 condition: "step1_gdm_risk == 1 && helper.getValueFromAccordion('accordion_blood_glucose', 'step2_gdm') != '1' && helper.getValueFromAccordion('accordion_blood_glucose', 'step2_dm_in_preg') != '1'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_gdm_risk_toaster description: Gestational diabetes mellitus (GDM) risk counseling priority: 1 condition: "step2_gdm_risk == 1 && helper.getValueFromAccordion('accordion_blood_glucose', 'step2_gdm') != '1' && helper.getValueFromAccordion('accordion_blood_glucose', 'step2_dm_in_preg') != '1'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_asb_positive_toaster description: asb_positive_toaster priority: 1 condition: "step1_asb_positive == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_asb_positive_toaster description: asb_positive_toaster priority: 1 condition: "step2_asb_positive == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_gbs_agent_note description: gbs_agent_note priority: 1 condition: "step1_urine_culture == 'positive_gbs'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_gbs_agent_note description: gbs_agent_note priority: 1 condition: "step2_urine_culture == 'positive_gbs'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_glucose_test_date description: Blood glucose test date. priority: 1 condition: "step2_glucose_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_glucose_test_type description: Blood glucose test. priority: 1 condition: "step2_glucose_test_status == 'done_today' || step2_glucose_test_status == 'done_earlier' || step2_glucose_test_status == 'ordered'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_fasting_plasma_gluc description: Fasting plasma glucose results (mg/dl) priority: 1 condition: "(step2_glucose_test_status == 'done_today' || step2_glucose_test_status == 'done_earlier') && step2_glucose_test_type == 'fasting_plasma'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_ogtt_fasting description: 75g OGTT - fasting glucose results (mg/dl) priority: 1 condition: "(step2_glucose_test_status == 'done_today' || step2_glucose_test_status == 'done_earlier') && step2_glucose_test_type == 'ogtt_75'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_ogtt_1 description: 75g OGTT - 1 hr results (mg/dl) priority: 1 condition: "(step2_glucose_test_status == 'done_today' || step2_glucose_test_status == 'done_earlier') && step2_glucose_test_type == 'ogtt_75'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_ogtt_2 description: 75g OGTT - 2 hrs results (mg/dl) priority: 1 condition: "(step2_glucose_test_status == 'done_today' || step2_glucose_test_status == 'done_earlier') && step2_glucose_test_type == 'ogtt_75'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_random_plasma description: Random plasma glucose results (mg/dl) priority: 1 condition: "(step2_glucose_test_status == 'done_today' || step2_glucose_test_status == 'done_earlier') && step2_glucose_test_type == 'random_plasma'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_gestational_diabetes_danger_toaster description: gestational_diabetes_danger_toaster priority: 1 condition: "step2_gdm == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_diabetes_mellitus_danger_toaster description: diabetes_mellitus_danger_toaster priority: 1 condition: "step2_dm_in_preg == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_dietary_intervention_danger_toaster description: dietary_intervention_danger_toaster priority: 1 condition: "step2_gdm == 1 || step2_dm_in_preg == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hb_test_notdone description: hb_test_notdone priority: 1 condition: "step1_hb_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hb_test_notdone description: hb_test_notdone priority: 1 condition: "step2_hb_test_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hb_test_notdone_other description: hb_test_notdone_other priority: 1 condition: "step1_hb_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hb_test_notdone_other description: hb_test_notdone_other priority: 1 condition: "step2_hb_test_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hb_test_date description: hb_test_date priority: 1 condition: "step1_hb_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hb_test_date description: hb_test_date priority: 1 condition: "step2_hb_test_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hb_test_type description: hb_test_type priority: 1 condition: "step1_hb_test_status == 'done_today' || step1_hb_test_status == 'done_earlier' || step1_hb_test_status == 'ordered'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hb_test_type description: hb_test_type priority: 1 condition: "step2_hb_test_status == 'done_today' || step2_hb_test_status == 'done_earlier' || step2_hb_test_status == 'ordered'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_cbc description: cbc priority: 1 condition: "(step1_hb_test_status == 'done_today' || step1_hb_test_status == 'done_earlier') && step1_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_cbc description: cbc priority: 1 condition: "(step2_hb_test_status == 'done_today' || step2_hb_test_status == 'done_earlier') && step2_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hb_gmeter description: hb_gmeter priority: 1 condition: "(step1_hb_test_status == 'done_today' || step1_hb_test_status == 'done_earlier') && step1_hb_test_type == 'hb_test_haemoglobinometer'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hb_gmeter description: hb_gmeter priority: 1 condition: "(step2_hb_test_status == 'done_today' || step2_hb_test_status == 'done_earlier') && step2_hb_test_type == 'hb_test_haemoglobinometer'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hb_colour description: hb_test_type priority: 1 condition: "(step1_hb_test_status == 'done_today' || step1_hb_test_status == 'done_earlier') && step1_hb_test_type == 'hb_test_colour_scale'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hb_colour description: hb_test_type priority: 1 condition: "(step2_hb_test_status == 'done_today' || step2_hb_test_status == 'done_earlier') && step2_hb_test_type == 'hb_test_colour_scale'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_anaemia_diagnosis_danger_toaster description: anaemia_diagnosis_danger_toaster priority: 1 condition: "step1_anaemic == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_anaemia_diagnosis_danger_toaster description: anaemia_diagnosis_danger_toaster priority: 1 condition: "step2_anaemic == 1" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_ht description: ht priority: 1 condition: "(step1_hb_test_status == 'done_today' || step1_hb_test_status == 'done_earlier') && step1_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_ht description: ht priority: 1 condition: "(step2_hb_test_status == 'done_today' || step2_hb_test_status == 'done_earlier') && step2_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_hematocrit_danger_toaster description: hematocrit_danger_toaster priority: 1 condition: "step1_ht > 0 && step1_ht < 20" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_hematocrit_danger_toaster description: hematocrit_danger_toaster priority: 1 condition: "step2_ht > 0 && step2_ht < 20" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_wbc description: wbc priority: 1 condition: "(step1_hb_test_status == 'done_today' || step1_hb_test_status == 'done_earlier') && step1_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_wbc description: wbc priority: 1 condition: "(step2_hb_test_status == 'done_today' || step2_hb_test_status == 'done_earlier') && step2_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_wbc_danger_toaster description: wbc_danger_toaster priority: 1 condition: "step1_wbc > 16000" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_wbc_danger_toaster description: wbc_danger_toaster priority: 1 condition: "step2_wbc > 16000" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_platelets description: platelets priority: 1 condition: "(step1_hb_test_status == 'done_today' || step1_hb_test_status == 'done_earlier') && step1_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_platelets description: platelets priority: 1 condition: "(step2_hb_test_status == 'done_today' || step2_hb_test_status == 'done_earlier') && step2_hb_test_type == 'complete_blood_count'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_paltelets_danger_toaster description: paltelets_danger_toaster priority: 1 condition: "step1_platelets > 0 && step1_platelets < 100000" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_paltelets_danger_toaster description: paltelets_danger_toaster priority: 1 condition: "step2_platelets > 0 && step2_platelets < 100000" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_tb_screening_notdone description: tb_screening_status priority: 1 condition: "step1_tb_screening_status != '' && step1_tb_screening_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_tb_screening_notdone description: tb_screening_status priority: 1 condition: "step2_tb_screening_status != '' && step2_tb_screening_status == 'not_done'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_tb_screening_date description: tb date priority: 1 condition: "step1_tb_screening_status != '' && step1_tb_screening_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_tb_screening_date description: tb date priority: 1 condition: "step2_tb_screening_status != '' && step2_tb_screening_status == 'done_earlier'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_tb_screening_danger_toaster description: tb toaster priority: 1 condition: "step1_tb_screening_result != '' && step1_tb_screening_result == 'positive'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_tb_screening_danger_toaster description: tb toaster priority: 1 condition: "step2_tb_screening_result!= '' && step2_tb_screening_result == 'positive'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_tb_screening_notdone_other description: tb_screening_status priority: 1 condition: "!step1_tb_screening_notdone.isEmpty() && step1_tb_screening_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_tb_screening_notdone_other description: tb_screening_status priority: 1 condition: "!step2_tb_screening_notdone.isEmpty() && step2_tb_screening_notdone.contains('other')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_tb_screening_result description: tb_screening_result priority: 1 condition: "step1_tb_screening_status != '' && (step1_tb_screening_status == 'done_today' || step1_tb_screening_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_tb_screening_result description: tb_screening_result priority: 1 condition: "step2_tb_screening_status != '' && (step2_tb_screening_status == 'done_today' || step2_tb_screening_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_blood_type_test_date description: blood_type_test_date priority: 1 condition: "(step1_blood_type_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_blood_type_test_date description: blood_type_test_date priority: 1 condition: "(step2_blood_type_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_blood_type description: blood_type priority: 1 condition: "(step1_blood_type_test_status == 'done_today' || step1_blood_type_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_blood_type description: blood_type priority: 1 condition: "(step2_blood_type_test_status == 'done_today' || step2_blood_type_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_rh_factor description: rh_factor priority: 1 condition: "(step1_blood_type_test_status == 'done_today' || step1_blood_type_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_rh_factor description: rh_factor priority: 1 condition: "(step2_blood_type_test_status == 'done_today' || step2_blood_type_test_status == 'done_earlier')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step1_rh_factor_toaster description: rh_factor priority: 1 condition: "(step1_rh_factor != '' && step1_rh_factor == 'negative')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_rh_factor_toaster description: rh_factor priority: 1 condition: "(step2_rh_factor != '' && step2_rh_factor == 'negative')" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_other_test_name description: other_test_name priority: 1 condition: "step2_other_test == 'done_earlier' || step2_other_test == 'done_today'" actions: -- "isRelevant = true" + - "isRelevant = true" --- name: step2_other_test_result description: other_test_result priority: 1 condition: "step2_other_test == 'done_earlier' || step2_other_test == 'done_today'" -actions: -- "isRelevant = true" ---- -name: step1_covid_test_date -description: COVID test date -priority: 1 -condition: "(step1_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_covid_test_date -description: COVID test date -priority: 1 -condition: "(step2_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step1_covid_test_type -description: COVID test type -priority: 1 -condition: "(step1_covid_status == 'done_today' || step1_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_covid_test_type -description: COVID test type -priority: 1 -condition: "(step2_covid_status == 'done_today' || step2_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step1_covid_pcr_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step1_covid_test_type == 'covid_pcr_test' && step1_covid_status == 'done_today') || (step1_covid_test_type == 'hbsag_lab_based' && step1_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_covid_pcr_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step2_covid_test_type == 'covid_pcr_test' && step2_covid_status == 'done_today') || (step2_covid_test_type == 'hbsag_lab_based' && step2_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step1_covid_antigen_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step1_covid_test_type == 'covid_antigen_test' && step1_covid_status == 'done_today') || (step1_covid_test_type == 'covid_antigen_test' && step1_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_covid_antigen_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step2_covid_test_type == 'covid_antigen_test' && step2_covid_status == 'done_today') || (step2_covid_test_type == 'covid_antigen_test' && step2_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step1_covid_igg_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step1_covid_test_type == 'covid_igg_test' && step1_covid_status == 'done_today') || (step1_covid_test_type == 'covid_igg_test' && step1_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_covid_igg_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step2_covid_test_type == 'covid_igg_test' && step2_covid_status == 'done_today') || (step2_covid_test_type == 'covid_igg_test' && step2_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step1_covid_igm_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step1_covid_test_type == 'covid_igm_test' && step1_covid_status == 'done_today') || (step1_covid_test_type == 'covid_igm_test' && step1_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_covid_igm_test -description: HBsAg laboratory-based immunoassay (recommended) -priority: 1 -condition: "(step2_covid_test_type == 'covid_igm_test' && step2_covid_status == 'done_today') || (step2_covid_test_type == 'covid_igm_test' && step2_covid_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step1_toxo_test_status -description: toxo_test_status -priority: 1 -condition: "global_contact_no == 1 || (global_contact_no > 1 && (global_gest_age_openmrs != '' && (global_gest_age_openmrs == 20 || global_gest_age_openmrs == 28)))" -actions: - - "isRelevant = true" ---- -name: step2_toxo_test_date -description: toxo_test_datedate -priority: 1 -condition: "step2_toxo_test_status != '' && step2_toxo_test_status == 'done_earlier'" -actions: - - "isRelevant = true" ---- -name: step2_toxo_igg_test -description: toxo_igg_test -priority: 1 -condition: "(step2_toxo_test_status == 'done_today' || step2_toxo_test_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_toxo_igm_test -description: toxo_igm_test -priority: 1 -condition: "(step2_toxo_test_status == 'done_today' || step2_toxo_test_status == 'done_earlier')" -actions: - - "isRelevant = true" ---- -name: step2_toxo_avidity_test -description: toxo_avidity_test -priority: 1 -condition: "(step2_toxo_igm_test == 'positive')" -actions: - - "isRelevant = true" ---- -name: step2_toaster_toxoplasmosis_susceptible -description: toaster_toxoplasmosis_susceptible -priority: 1 -condition: "(step2_toxo_igm_test == 'negative' && step2_toxo_igg_test == 'negative')" -actions: - - "isRelevant = true" ---- -name: step2_toaster_toxoplasmosis_immune -description: toaster_toxoplasmosis_immune -priority: 1 -condition: "(step2_toxo_igm_test == 'negative' && step2_toxo_igg_test == 'positive') || (step2_toxo_igm_test == 'positive' && step2_toxo_igg_test == 'positive' && (global_gest_age_openmrs != '' && global_gest_age_openmrs < 16) && step2_toxo_avidity_test == 'greater_than_60')" -actions: - - "isRelevant = true" ---- -name: step2_toaster_toxoplasmosis_positive -description: toaster_toxoplasmosis_positive -priority: 1 -condition: "(step2_toxo_igm_test == 'positive' && step2_toxo_igg_test == 'negative') || (step2_toxo_igm_test == 'positive' && step2_toxo_igg_test == 'positive' && (global_gest_age_openmrs != '' && global_gest_age_openmrs > 16) && step2_toxo_avidity_test == 'greater_than_60') || (step2_toxo_avidity_test == 'less_than_60')" actions: - "isRelevant = true" \ No newline at end of file diff --git a/opensrp-anc/src/main/ic_launcher-playstore.png b/opensrp-anc/src/main/ic_launcher-playstore.png new file mode 100644 index 000000000..03a7ad5da Binary files /dev/null and b/opensrp-anc/src/main/ic_launcher-playstore.png differ diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/AncLibrary.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/AncLibrary.java index 6601042b9..41adcbb6b 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/AncLibrary.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/AncLibrary.java @@ -348,6 +348,16 @@ public void setRegisterQueryProvider(RegisterQueryProvider registerQueryProvider this.registerQueryProvider = registerQueryProvider; } + public AppProperties getProperties() { + return CoreLibrary.getInstance().context().getAppProperties(); + } + + public void notifyAppContextChange() { + if (getApplicationContext() != null) { + Locale current = getApplicationContext().getResources().getConfiguration().locale; + Utils.saveLanguage(current.getLanguage()); + } + } public AncMetadata getAncMetadata() { return ancMetadata; @@ -359,15 +369,4 @@ public AppExecutors getAppExecutors() { } return appExecutors; } - - public AppProperties getProperties() { - return CoreLibrary.getInstance().context().getAppProperties(); - } - - public void notifyAppContextChange() { - if (getApplicationContext() != null) { - Locale current = getApplicationContext().getResources().getConfiguration().locale; - Utils.saveLanguage(current.getLanguage()); - } - } } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/AppConfig.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/AppConfig.java new file mode 100644 index 000000000..94f25f3ac --- /dev/null +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/AppConfig.java @@ -0,0 +1,16 @@ +package org.smartregister.anc.library; + +import org.smartregister.anc.library.constants.Constants; +import org.smartregister.anc.library.util.Utils; +import org.smartregister.util.LangUtils; + +import java.util.Locale; + +/** Application configuration to accomodate local requirements. */ +public class AppConfig { + + /** The default locale of the app for language translations & locale-specific resources. */ + public static final Locale DefaultLocale = Constants.Locales.INDONESIAN_ID; + + +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseActivity.java index ef72630a2..1f91fc89c 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseActivity.java @@ -7,10 +7,13 @@ import androidx.appcompat.app.AppCompatActivity; import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.AppConfig; import org.smartregister.anc.library.R; import org.smartregister.anc.library.contract.SiteCharacteristicsContract; import org.smartregister.anc.library.util.ANCJsonFormUtils; import org.smartregister.anc.library.util.ConstantsUtils; +import org.smartregister.anc.library.util.Utils; +import org.smartregister.util.LangUtils; import java.util.Map; @@ -46,6 +49,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { @Override public void launchSiteCharacteristicsSettingsForm() { + setDefaultLocale(); ANCJsonFormUtils.launchSiteCharacteristicsForm(this); } @@ -100,4 +104,9 @@ public void launchSiteCharacteristicsSettingsFormForEdit(Map cha Timber.e(e); } } + + public void setDefaultLocale() { + LangUtils.saveLanguage(getApplication(), AppConfig.DefaultLocale.getLanguage()); + Utils.saveLanguage(AppConfig.DefaultLocale.getLanguage()); + } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseHomeRegisterActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseHomeRegisterActivity.java index f708a4fe7..50ea4b338 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseHomeRegisterActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseHomeRegisterActivity.java @@ -1,504 +1,526 @@ -package org.smartregister.anc.library.activity; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.LinearLayout; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.appcompat.app.AlertDialog; -import androidx.fragment.app.Fragment; - -import com.google.android.gms.vision.barcode.Barcode; -import com.google.android.material.bottomnavigation.LabelVisibilityMode; -import com.vijay.jsonwizard.activities.FormConfigurationJsonFormActivity; -import com.vijay.jsonwizard.constants.JsonFormConstants; - -import org.apache.commons.lang3.StringUtils; -import org.greenrobot.eventbus.EventBus; -import org.greenrobot.eventbus.Subscribe; -import org.greenrobot.eventbus.ThreadMode; -import org.json.JSONObject; -import org.smartregister.AllConstants; -import org.smartregister.anc.library.AncLibrary; -import org.smartregister.anc.library.R; -import org.smartregister.anc.library.contract.RegisterContract; -import org.smartregister.anc.library.domain.AttentionFlag; -import org.smartregister.anc.library.domain.Contact; -import org.smartregister.anc.library.event.PatientRemovedEvent; -import org.smartregister.anc.library.event.ShowProgressDialogEvent; -import org.smartregister.anc.library.fragment.AdvancedSearchFragment; -import org.smartregister.anc.library.fragment.HomeRegisterFragment; -import org.smartregister.anc.library.fragment.LibraryFragment; -import org.smartregister.anc.library.fragment.MeFragment; -import org.smartregister.anc.library.fragment.SortFilterFragment; -import org.smartregister.anc.library.presenter.RegisterPresenter; -import org.smartregister.anc.library.repository.PatientRepository; -import org.smartregister.anc.library.util.ANCFormUtils; -import org.smartregister.anc.library.util.ANCJsonFormUtils; -import org.smartregister.anc.library.util.ConstantsUtils; -import org.smartregister.anc.library.util.DBConstantsUtils; -import org.smartregister.anc.library.util.Utils; -import org.smartregister.commonregistry.CommonPersonObjectClient; -import org.smartregister.configurableviews.ConfigurableViewsLibrary; -import org.smartregister.configurableviews.model.Field; -import org.smartregister.domain.FetchStatus; -import org.smartregister.helper.BottomNavigationHelper; -import org.smartregister.listener.BottomNavigationListener; -import org.smartregister.view.activity.BaseRegisterActivity; -import org.smartregister.view.fragment.BaseRegisterFragment; - -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import timber.log.Timber; - -/** - * Created by keyman on 26/06/2018. - */ - -public class BaseHomeRegisterActivity extends BaseRegisterActivity implements RegisterContract.View { - private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("dd/MM/yyyy"); - - private AlertDialog recordBirthAlertDialog; - private AlertDialog attentionFlagAlertDialog; - private View attentionFlagDialogView; - private boolean isAdvancedSearch = false; - private boolean isLibrary = false; - private String advancedSearchQrText = ""; - private HashMap advancedSearchFormData = new HashMap<>(); - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - recordBirthAlertDialog = createAlertDialog(); - createAttentionFlagsAlertDialog(); - } - - @Override - protected void registerBottomNavigation() { - bottomNavigationHelper = new BottomNavigationHelper(); - bottomNavigationView = findViewById(org.smartregister.R.id.bottom_navigation); - - if (bottomNavigationView != null) { - if (isMeItemEnabled()) { - bottomNavigationView.getMenu() - .add(Menu.NONE, org.smartregister.R.string.action_me, Menu.NONE, org.smartregister.R.string.me).setIcon( - bottomNavigationHelper - .writeOnDrawable(org.smartregister.R.drawable.bottom_bar_initials_background, userInitials, - getResources())); - } - - bottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED); - - if (!isLibraryItemEnabled()) { - bottomNavigationView.getMenu().removeItem(R.id.action_library); - } - - if (!isAdvancedSearchEnabled()) { - bottomNavigationView.getMenu().removeItem(R.id.action_search); - } - - BottomNavigationListener bottomNavigationListener = new BottomNavigationListener(this); - bottomNavigationView.setOnNavigationItemSelectedListener(bottomNavigationListener); - } - } - - @Override - public void onBackPressed() { - Fragment fragment = findFragmentByPosition(currentPage); - if (fragment instanceof AdvancedSearchFragment) { - ((AdvancedSearchFragment) fragment).onBackPressed(); - return; - } else if (fragment instanceof BaseRegisterFragment) { - setSelectedBottomBarMenuItem(org.smartregister.R.id.action_clients); - BaseRegisterFragment registerFragment = (BaseRegisterFragment) fragment; - if (registerFragment.onBackPressed()) { - return; - } - } - if (currentPage == 0) { - super.onBackPressed(); - } else { - switchToBaseFragment(); - setSelectedBottomBarMenuItem(org.smartregister.R.id.action_clients); - } - } - - @Override - protected void initializePresenter() { - presenter = new RegisterPresenter(this); - } - - @Override - public BaseRegisterFragment getRegisterFragment() { - return new HomeRegisterFragment(); - } - - @Override - protected Fragment[] getOtherFragments() { - int posCounter = 0; - if (isAdvancedSearchEnabled()) { - BaseRegisterActivity.ADVANCED_SEARCH_POSITION = ++posCounter; - } - - BaseRegisterActivity.SORT_FILTER_POSITION = ++posCounter; - - if (isMeItemEnabled()) { - BaseRegisterActivity.ME_POSITION = ++posCounter; - } - - if (isLibraryItemEnabled()) { - BaseRegisterActivity.LIBRARY_POSITION = ++posCounter; - } - - Fragment[] fragments = new Fragment[posCounter]; - - if (isAdvancedSearchEnabled()) { - fragments[BaseRegisterActivity.ADVANCED_SEARCH_POSITION - 1] = new AdvancedSearchFragment(); - } - - fragments[BaseRegisterActivity.SORT_FILTER_POSITION - 1] = new SortFilterFragment(); - - if (isMeItemEnabled()) { - fragments[BaseRegisterActivity.ME_POSITION - 1] = new MeFragment(); - } - - if (isLibraryItemEnabled()) { - fragments[BaseRegisterActivity.LIBRARY_POSITION - 1] = new LibraryFragment(); - } - - return fragments; - } - - @Override - public void startFormActivity(String s, String s1, Map map) { - //Todo implementing an abstract class - } - - @Override - public void startFormActivity(String formName, String entityId, String metaData) { - try { - if (mBaseFragment instanceof HomeRegisterFragment) { - String locationId = AncLibrary.getInstance().getContext().allSharedPreferences().getPreference(AllConstants.CURRENT_LOCATION_ID); - ((RegisterPresenter) presenter).startForm(formName, entityId, metaData, locationId); - } - } catch (Exception e) { - Timber.e(e, "%s --> startFormActivity()", this.getClass().getCanonicalName()); - displayToast(getString(R.string.error_unable_to_start_form)); - } - - } - - @Override - public void startFormActivity(JSONObject form) { - Intent intent = new Intent(this, AncRegistrationActivity.class); - intent.putExtra(ConstantsUtils.JsonFormExtraUtils.JSON, form.toString()); - intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); - startActivityForResult(intent, ANCJsonFormUtils.REQUEST_CODE_GET_JSON); - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode == AllConstants.BARCODE.BARCODE_REQUEST_CODE && resultCode == Activity.RESULT_OK) { - if (data != null) { - Barcode barcode = data.getParcelableExtra(AllConstants.BARCODE.BARCODE_KEY); - if (barcode != null) { - Timber.d(barcode.displayValue); - - Fragment fragment = findFragmentByPosition(currentPage); - if (fragment instanceof AdvancedSearchFragment) { - advancedSearchQrText = barcode.displayValue; - } else { - mBaseFragment.onQRCodeSucessfullyScanned(barcode.displayValue); - mBaseFragment.setSearchTerm(barcode.displayValue); - } - } - } else { - Timber.i("NO RESULT FOR QR CODE"); - } - } else { - super.onActivityResult(requestCode, resultCode, data); - } - } - - @Override - protected void onActivityResultExtended(int requestCode, int resultCode, Intent data) { - if (requestCode == ANCJsonFormUtils.REQUEST_CODE_GET_JSON && resultCode == Activity.RESULT_OK) { - try { - String jsonString = data.getStringExtra(ConstantsUtils.JsonFormExtraUtils.JSON); - Timber.d(jsonString); - if (StringUtils.isNotBlank(jsonString)) { - JSONObject form = new JSONObject(jsonString); - switch (form.getString(ANCJsonFormUtils.ENCOUNTER_TYPE)) { - case ConstantsUtils.EventTypeUtils.REGISTRATION: - ((RegisterContract.Presenter) presenter).saveRegistrationForm(jsonString, false); - break; - case ConstantsUtils.EventTypeUtils.CLOSE: - ((RegisterContract.Presenter) presenter).closeAncRecord(jsonString); - break; - case ConstantsUtils.EventTypeUtils.QUICK_CHECK: - Contact contact = new Contact(); - contact.setContactNumber(getIntent().getIntExtra(ConstantsUtils.IntentKeyUtils.CONTACT_NO, 0)); - ANCFormUtils - .persistPartial(getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID), contact); - PatientRepository - .updateContactVisitStartDate(getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID), - Utils.getDBDateToday()); - break; - default: - break; - } - } - } catch (Exception e) { - Timber.e(e, "%s --> onActivityResultExtended()", this.getClass().getCanonicalName()); - } - - } - } - - @Override - public void onResume() { - super.onResume(); - EventBus.getDefault().register(this); - - if (isAdvancedSearchEnabled()) { - switchToAdvancedSearchFromBarcode(); - } - if (isLibrary()) { - switchToFragment(BaseRegisterActivity.LIBRARY_POSITION); - setSelectedBottomBarMenuItem(org.smartregister.R.id.action_library); - } - } - - @Override - public List getViewIdentifiers() { - return Arrays.asList(ConstantsUtils.ConfigurationUtils.HOME_REGISTER); - } - - @Override - public void updateInitialsText(String initials) { - this.userInitials = initials; - } - - public void switchToBaseFragment() { - switchToFragment(BaseRegisterActivity.BASE_REG_POSITION); - } - - public void setSelectedBottomBarMenuItem(int itemId) { - bottomNavigationView.setSelectedItemId(itemId); - } - - /** - * Forces the Home register activity to open the the Advanced search fragment after the barcode activity is closed (as - * long as it was opened from the advanced search page) - */ - private void switchToAdvancedSearchFromBarcode() { - if (isAdvancedSearch) { - switchToFragment(BaseRegisterActivity.ADVANCED_SEARCH_POSITION); - setSelectedBottomBarMenuItem(org.smartregister.R.id.action_search); - setAdvancedFragmentSearchTerm(advancedSearchQrText); - setFormData(advancedSearchFormData); - advancedSearchQrText = ""; - isAdvancedSearch = false; - advancedSearchFormData = new HashMap<>(); - } - } - - public boolean isLibrary() { - return isLibrary; - } - - private void setAdvancedFragmentSearchTerm(String searchTerm) { - mBaseFragment.setUniqueID(searchTerm); - } - - private void setFormData(HashMap formData) { - mBaseFragment.setAdvancedSearchFormData(formData); - } - - public void setLibrary(boolean library) { - isLibrary = library; - } - - public boolean isMeItemEnabled() { - return true; - } - - public boolean isLibraryItemEnabled() { - return true; - } - - public boolean isAdvancedSearchEnabled() { - return true; - } - - @NonNull - protected AlertDialog createAlertDialog() { - AlertDialog alertDialog = new AlertDialog.Builder(this).create(); - alertDialog.setTitle(getString(R.string.record_birth) + "?"); - - alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, getString(R.string.cancel).toUpperCase(), - (dialog, which) -> dialog.dismiss()); - alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(R.string.record_birth).toUpperCase(), - (dialog, which) -> ANCJsonFormUtils.launchANCCloseForm(BaseHomeRegisterActivity.this)); - return alertDialog; - } - - @NonNull - protected void createAttentionFlagsAlertDialog() { - AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this); - - attentionFlagDialogView = LayoutInflater.from(this).inflate(R.layout.alert_dialog_attention_flag, null); - dialogBuilder.setView(attentionFlagDialogView); - - attentionFlagDialogView.findViewById(R.id.closeButton).setOnClickListener(view -> attentionFlagAlertDialog.dismiss()); - attentionFlagAlertDialog = dialogBuilder.create(); - setAttentionFlagAlertDialog(attentionFlagAlertDialog); - } - - public void updateSortAndFilter(List filterList, Field sortField) { - ((HomeRegisterFragment) mBaseFragment).updateSortAndFilter(filterList, sortField); - switchToBaseFragment(); - } - - public void startAdvancedSearch() { - if (isAdvancedSearchEnabled()) { - try { - mPager.setCurrentItem(BaseRegisterActivity.ADVANCED_SEARCH_POSITION, false); - } catch (Exception e) { - Timber.e(e, "%s --> startAdvancedSearch()", this.getClass().getCanonicalName()); - } - } - - } - - @Override - public void showLanguageDialog(final List displayValues) { - ArrayAdapter adapter = new ArrayAdapter(getApplicationContext(), android.R.layout.simple_list_item_1, - displayValues.toArray(new String[displayValues.size()])) { - @Override - public View getView(int position, View convertView, ViewGroup parent) { - TextView view = (TextView) super.getView(position, convertView, parent); - ConfigurableViewsLibrary.getInstance(); - view.setTextColor(ConfigurableViewsLibrary.getContext().getColorResource(R.color.customAppThemeBlue)); - - return view; - } - }; - - AlertDialog languageDialog = createLanguageDialog(adapter, displayValues); - languageDialog.show(); - } - - public AlertDialog createLanguageDialog(ArrayAdapter adapter, final List displayValues) { - final AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle(this.getString(R.string.select_language)); - builder.setSingleChoiceItems(adapter, 0, (dialog, which) -> { - String selectedItem = displayValues.get(which); - ((RegisterContract.Presenter) presenter).saveLanguage(selectedItem); - dialog.dismiss(); - }); - - return builder.create(); - } - - @Override - public void showAttentionFlagsDialog(List attentionFlags) { - ViewGroup redFlagsContainer = attentionFlagDialogView.findViewById(R.id.red_flags_container); - ViewGroup yellowFlagsContainer = attentionFlagDialogView.findViewById(R.id.yellow_flags_container); - - redFlagsContainer.removeAllViews(); - yellowFlagsContainer.removeAllViews(); - - int yellowFlagCount = 0; - int redFlagCount = 0; - - for (AttentionFlag flag : attentionFlags) { - if (flag.isRedFlag()) { - LinearLayout redRow = (LinearLayout) LayoutInflater.from(this) - .inflate(R.layout.alert_dialog_attention_flag_row_red, redFlagsContainer, false); - ((TextView) redRow.getChildAt(1)).setText(flag.getTitle()); - redFlagsContainer.addView(redRow); - redFlagCount += 1; - } else { - - LinearLayout yellowRow = (LinearLayout) LayoutInflater.from(this) - .inflate(R.layout.alert_dialog_attention_flag_row_yellow, yellowFlagsContainer, false); - ((TextView) yellowRow.getChildAt(1)).setText(flag.getTitle()); - yellowFlagsContainer.addView(yellowRow); - yellowFlagCount += 1; - } - } - - ((View) redFlagsContainer.getParent()).setVisibility(redFlagCount > 0 ? View.VISIBLE : View.GONE); - ((View) yellowFlagsContainer.getParent()).setVisibility(yellowFlagCount > 0 ? View.VISIBLE : View.GONE); - - getAttentionFlagAlertDialog().show(); - } - - public AlertDialog getAttentionFlagAlertDialog() { - return attentionFlagAlertDialog; - } - - public void setAttentionFlagAlertDialog(AlertDialog attentionFlagAlertDialog) { - this.attentionFlagAlertDialog = attentionFlagAlertDialog; - } - - @Override - public void onPause() { - EventBus.getDefault().unregister(this); - super.onPause(); - } - - @Subscribe(threadMode = ThreadMode.MAIN) - public void showProgressDialogHandler(ShowProgressDialogEvent showProgressDialogEvent) { - if (showProgressDialogEvent != null) { - showProgressDialog(R.string.saving_dialog_title); - } - } - - @Subscribe(sticky = true, threadMode = ThreadMode.MAIN) - public void removePatientHandler(PatientRemovedEvent event) { - if (event != null) { - Utils.removeStickyEvent(event); - refreshList(FetchStatus.fetched); - hideProgressDialog(); - } - } - - @Override - public void startRegistration() { - startFormActivity(ConstantsUtils.JsonFormUtils.ANC_REGISTER, null, ""); - } - - public void showRecordBirthPopUp(CommonPersonObjectClient client) { - //This is required - getIntent() - .putExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID, client.getColumnmaps().get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID)); - - recordBirthAlertDialog.setMessage(String.format(this.getString(R.string.record_birth_popup_message), - Utils.getGestationAgeFromEDDate(client.getColumnmaps().get(DBConstantsUtils.KeyUtils.EDD)), - Utils.convertDateFormat(Utils.dobStringToDate(client.getColumnmaps().get(DBConstantsUtils.KeyUtils.EDD)), - dateFormatter), Utils.getDuration(client.getColumnmaps().get(DBConstantsUtils.KeyUtils.EDD)), - client.getColumnmaps().get(DBConstantsUtils.KeyUtils.FIRST_NAME))); - recordBirthAlertDialog.show(); - } - - public void setAdvancedSearch(boolean advancedSearch) { - isAdvancedSearch = advancedSearch; - } - - public void setAdvancedSearchFormData(HashMap advancedSearchFormData) { - this.advancedSearchFormData = advancedSearchFormData; - } -} +package org.smartregister.anc.library.activity; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.Fragment; + +import com.google.android.gms.vision.barcode.Barcode; +import com.google.android.material.bottomnavigation.LabelVisibilityMode; +import com.google.android.material.navigation.NavigationBarView; +import com.vijay.jsonwizard.activities.FormConfigurationJsonFormActivity; +import com.vijay.jsonwizard.constants.JsonFormConstants; + +import org.apache.commons.lang3.StringUtils; +import org.greenrobot.eventbus.EventBus; +import org.greenrobot.eventbus.Subscribe; +import org.greenrobot.eventbus.ThreadMode; +import org.json.JSONObject; +import org.smartregister.AllConstants; +import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.AppConfig; +import org.smartregister.anc.library.R; +import org.smartregister.anc.library.constants.Constants; +import org.smartregister.anc.library.contract.RegisterContract; +import org.smartregister.anc.library.domain.AttentionFlag; +import org.smartregister.anc.library.domain.Contact; +import org.smartregister.anc.library.event.PatientRemovedEvent; +import org.smartregister.anc.library.event.ShowProgressDialogEvent; +import org.smartregister.anc.library.fragment.AdvancedSearchFragment; +import org.smartregister.anc.library.fragment.HomeRegisterFragment; +import org.smartregister.anc.library.fragment.LibraryFragment; +import org.smartregister.anc.library.fragment.MeFragment; +import org.smartregister.anc.library.fragment.SortFilterFragment; +import org.smartregister.anc.library.presenter.RegisterPresenter; +import org.smartregister.anc.library.repository.PatientRepository; +import org.smartregister.anc.library.util.ANCFormUtils; +import org.smartregister.anc.library.util.ANCJsonFormUtils; +import org.smartregister.anc.library.util.ConstantsUtils; +import org.smartregister.anc.library.util.DBConstantsUtils; +import org.smartregister.anc.library.util.Utils; +import org.smartregister.commonregistry.CommonPersonObjectClient; +import org.smartregister.configurableviews.ConfigurableViewsLibrary; +import org.smartregister.configurableviews.model.Field; +import org.smartregister.domain.FetchStatus; +import org.smartregister.helper.BottomNavigationHelper; +import org.smartregister.listener.BottomNavigationListener; +import org.smartregister.util.LangUtils; +import org.smartregister.view.activity.BaseRegisterActivity; +import org.smartregister.view.fragment.BaseRegisterFragment; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import timber.log.Timber; + +/** + * Created by keyman on 26/06/2018. + */ + +public class BaseHomeRegisterActivity extends BaseRegisterActivity implements RegisterContract.View { + private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("dd/MM/yyyy"); + + private AlertDialog recordBirthAlertDialog; + private AlertDialog attentionFlagAlertDialog; + private View attentionFlagDialogView; + private boolean isAdvancedSearch = false; + private boolean isLibrary = false; + private String advancedSearchQrText = ""; + private HashMap advancedSearchFormData = new HashMap<>(); + + @Override + protected void onCreate(Bundle savedInstanceState) { + if (savedInstanceState == null) { + setDefaultLocale(); + } + super.onCreate(null); + recordBirthAlertDialog = createAlertDialog(); + createAttentionFlagsAlertDialog(); + } + + public void setDefaultLocale() { + LangUtils.saveLanguage(getApplication(), AppConfig.DefaultLocale.getLanguage()); + Utils.saveLanguage(AppConfig.DefaultLocale.getLanguage()); + } + + public void setLocale(Locale locale) { + if (locale != null) { + LangUtils.saveLanguage(getApplication(), locale.getLanguage()); + Utils.saveLanguage(locale.getLanguage()); + recreate(); + } + } + + @Override + protected void registerBottomNavigation() { + bottomNavigationHelper = new BottomNavigationHelper(); + bottomNavigationView = findViewById(org.smartregister.R.id.bottom_navigation); + + if (bottomNavigationView != null) { + if (isMeItemEnabled()) { + bottomNavigationView.getMenu() + .add(Menu.NONE, org.smartregister.R.string.action_me, Menu.NONE, org.smartregister.R.string.me).setIcon( + bottomNavigationHelper + .writeOnDrawable(org.smartregister.R.drawable.bottom_bar_initials_background, userInitials, + getResources())); + } + + bottomNavigationView.setLabelVisibilityMode(NavigationBarView.LABEL_VISIBILITY_LABELED); + + if (!isLibraryItemEnabled()) { + bottomNavigationView.getMenu().removeItem(R.id.action_library); + } + + if (!isAdvancedSearchEnabled()) { + bottomNavigationView.getMenu().removeItem(R.id.action_search); + } + + BottomNavigationListener bottomNavigationListener = new BottomNavigationListener(this); + bottomNavigationView.setOnNavigationItemSelectedListener(bottomNavigationListener); + } + } + + @Override + public void onBackPressed() { + Fragment fragment = findFragmentByPosition(currentPage); + if (fragment instanceof AdvancedSearchFragment) { + ((AdvancedSearchFragment) fragment).onBackPressed(); + return; + } else if (fragment instanceof BaseRegisterFragment) { + setSelectedBottomBarMenuItem(org.smartregister.R.id.action_clients); + BaseRegisterFragment registerFragment = (BaseRegisterFragment) fragment; + if (registerFragment.onBackPressed()) { + return; + } + } + if (currentPage == 0) { + super.onBackPressed(); + } else { + switchToBaseFragment(); + setSelectedBottomBarMenuItem(org.smartregister.R.id.action_clients); + } + } + + @Override + protected void initializePresenter() { + presenter = new RegisterPresenter(this); + } + + @Override + public BaseRegisterFragment getRegisterFragment() { + return new HomeRegisterFragment(); + } + + @Override + protected Fragment[] getOtherFragments() { + int posCounter = 0; + if (isAdvancedSearchEnabled()) { + BaseRegisterActivity.ADVANCED_SEARCH_POSITION = ++posCounter; + } + + BaseRegisterActivity.SORT_FILTER_POSITION = ++posCounter; + + if (isMeItemEnabled()) { + BaseRegisterActivity.ME_POSITION = ++posCounter; + } + + if (isLibraryItemEnabled()) { + BaseRegisterActivity.LIBRARY_POSITION = ++posCounter; + } + + Fragment[] fragments = new Fragment[posCounter]; + + if (isAdvancedSearchEnabled()) { + fragments[BaseRegisterActivity.ADVANCED_SEARCH_POSITION - 1] = new AdvancedSearchFragment(); + } + + fragments[BaseRegisterActivity.SORT_FILTER_POSITION - 1] = new SortFilterFragment(); + + if (isMeItemEnabled()) { + fragments[BaseRegisterActivity.ME_POSITION - 1] = new MeFragment(); + } + + if (isLibraryItemEnabled()) { + fragments[BaseRegisterActivity.LIBRARY_POSITION - 1] = new LibraryFragment(); + } + + return fragments; + } + + @Override + public void startFormActivity(String s, String s1, Map map) { + //Todo implementing an abstract class + } + + @Override + public void startFormActivity(String formName, String entityId, String metaData) { + try { + if (mBaseFragment instanceof HomeRegisterFragment) { + String locationId = AncLibrary.getInstance().getContext().allSharedPreferences().getPreference(AllConstants.CURRENT_LOCATION_ID); + ((RegisterPresenter) presenter).startForm(formName, entityId, metaData, locationId); + } + } catch (Exception e) { + Timber.e(e, "%s --> startFormActivity()", this.getClass().getCanonicalName()); + displayToast(getString(R.string.error_unable_to_start_form)); + } + + } + + @Override + public void startFormActivity(JSONObject form) { + Intent intent = new Intent(this, AncRegistrationActivity.class); + intent.putExtra(ConstantsUtils.JsonFormExtraUtils.JSON, form.toString()); + intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); + startActivityForResult(intent, ANCJsonFormUtils.REQUEST_CODE_GET_JSON); + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + if (requestCode == AllConstants.BARCODE.BARCODE_REQUEST_CODE && resultCode == Activity.RESULT_OK) { + if (data != null) { + Barcode barcode = data.getParcelableExtra(AllConstants.BARCODE.BARCODE_KEY); + if (barcode != null) { + Timber.d(barcode.displayValue); + + Fragment fragment = findFragmentByPosition(currentPage); + if (fragment instanceof AdvancedSearchFragment) { + advancedSearchQrText = barcode.displayValue; + } else { + mBaseFragment.onQRCodeSucessfullyScanned(barcode.displayValue); + mBaseFragment.setSearchTerm(barcode.displayValue); + } + } + } else { + Timber.i("NO RESULT FOR QR CODE"); + } + } else { + super.onActivityResult(requestCode, resultCode, data); + } + } + + @Override + protected void onActivityResultExtended(int requestCode, int resultCode, Intent data) { + if (requestCode == ANCJsonFormUtils.REQUEST_CODE_GET_JSON && resultCode == Activity.RESULT_OK) { + try { + String jsonString = data.getStringExtra(ConstantsUtils.JsonFormExtraUtils.JSON); + Timber.d(jsonString); + if (StringUtils.isNotBlank(jsonString)) { + JSONObject form = new JSONObject(jsonString); + switch (form.getString(ANCJsonFormUtils.ENCOUNTER_TYPE)) { + case ConstantsUtils.EventTypeUtils.REGISTRATION: + ((RegisterContract.Presenter) presenter).saveRegistrationForm(jsonString, false); + break; + case ConstantsUtils.EventTypeUtils.CLOSE: + ((RegisterContract.Presenter) presenter).closeAncRecord(jsonString); + break; + case ConstantsUtils.EventTypeUtils.QUICK_CHECK: + Contact contact = new Contact(); + contact.setContactNumber(getIntent().getIntExtra(ConstantsUtils.IntentKeyUtils.CONTACT_NO, 0)); + ANCFormUtils + .persistPartial(getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID), contact); + PatientRepository + .updateContactVisitStartDate(getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID), + Utils.getDBDateToday()); + break; + default: + break; + } + } + } catch (Exception e) { + Timber.e(e, "%s --> onActivityResultExtended()", this.getClass().getCanonicalName()); + } + + } + } + + @Override + public void onResume() { + super.onResume(); + EventBus.getDefault().register(this); + + if (isAdvancedSearchEnabled()) { + switchToAdvancedSearchFromBarcode(); + } + if (isLibrary()) { + switchToFragment(BaseRegisterActivity.LIBRARY_POSITION); + setSelectedBottomBarMenuItem(org.smartregister.R.id.action_library); + } + } + + @Override + public List getViewIdentifiers() { + return Arrays.asList(ConstantsUtils.ConfigurationUtils.HOME_REGISTER); + } + + @Override + public void updateInitialsText(String initials) { + this.userInitials = initials; + } + + public void switchToBaseFragment() { + switchToFragment(BaseRegisterActivity.BASE_REG_POSITION); + } + + public void setSelectedBottomBarMenuItem(int itemId) { + bottomNavigationView.setSelectedItemId(itemId); + } + + /** + * Forces the Home register activity to open the the Advanced search fragment after the barcode activity is closed (as + * long as it was opened from the advanced search page) + */ + private void switchToAdvancedSearchFromBarcode() { + if (isAdvancedSearch) { + switchToFragment(BaseRegisterActivity.ADVANCED_SEARCH_POSITION); + setSelectedBottomBarMenuItem(org.smartregister.R.id.action_search); + setAdvancedFragmentSearchTerm(advancedSearchQrText); + setFormData(advancedSearchFormData); + advancedSearchQrText = ""; + isAdvancedSearch = false; + advancedSearchFormData = new HashMap<>(); + } + } + + public boolean isLibrary() { + return isLibrary; + } + + private void setAdvancedFragmentSearchTerm(String searchTerm) { + mBaseFragment.setUniqueID(searchTerm); + } + + private void setFormData(HashMap formData) { + mBaseFragment.setAdvancedSearchFormData(formData); + } + + public void setLibrary(boolean library) { + isLibrary = library; + } + + public boolean isMeItemEnabled() { + return true; + } + + public boolean isLibraryItemEnabled() { + return true; + } + + public boolean isAdvancedSearchEnabled() { + return true; + } + + @NonNull + protected AlertDialog createAlertDialog() { + AlertDialog alertDialog = new AlertDialog.Builder(this).create(); + alertDialog.setTitle(getString(R.string.record_birth) + "?"); + + alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, getString(R.string.cancel).toUpperCase(), + (dialog, which) -> dialog.dismiss()); + alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(R.string.record_birth).toUpperCase(), + (dialog, which) -> ANCJsonFormUtils.launchANCCloseForm(BaseHomeRegisterActivity.this)); + return alertDialog; + } + + @NonNull + protected void createAttentionFlagsAlertDialog() { + AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this); + + attentionFlagDialogView = LayoutInflater.from(this).inflate(R.layout.alert_dialog_attention_flag, null); + dialogBuilder.setView(attentionFlagDialogView); + + attentionFlagDialogView.findViewById(R.id.closeButton).setOnClickListener(view -> attentionFlagAlertDialog.dismiss()); + attentionFlagAlertDialog = dialogBuilder.create(); + setAttentionFlagAlertDialog(attentionFlagAlertDialog); + } + + public void updateSortAndFilter(List filterList, Field sortField) { + ((HomeRegisterFragment) mBaseFragment).updateSortAndFilter(filterList, sortField); + switchToBaseFragment(); + } + + public void startAdvancedSearch() { + if (isAdvancedSearchEnabled()) { + try { + mPager.setCurrentItem(BaseRegisterActivity.ADVANCED_SEARCH_POSITION, false); + } catch (Exception e) { + Timber.e(e, "%s --> startAdvancedSearch()", this.getClass().getCanonicalName()); + } + } + + } + + @Override + public void showLanguageDialog(final List displayValues) { + ArrayAdapter adapter = new ArrayAdapter(getApplicationContext(), android.R.layout.simple_list_item_1, + displayValues.toArray(new String[displayValues.size()])) { + @Override + public View getView(int position, View convertView, ViewGroup parent) { + TextView view = (TextView) super.getView(position, convertView, parent); + ConfigurableViewsLibrary.getInstance(); + view.setTextColor(ConfigurableViewsLibrary.getContext().getColorResource(R.color.customAppThemeBlue)); + + return view; + } + }; + + AlertDialog languageDialog = createLanguageDialog(adapter, displayValues); + languageDialog.show(); + } + + public AlertDialog createLanguageDialog(ArrayAdapter adapter, final List displayValues) { + final AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(this.getString(R.string.select_language)); + builder.setSingleChoiceItems(adapter, 0, (dialog, which) -> { + String selectedItem = displayValues.get(which); + ((RegisterContract.Presenter) presenter).saveLanguage(selectedItem); + dialog.dismiss(); + }); + + return builder.create(); + } + + @Override + public void showAttentionFlagsDialog(List attentionFlags) { + ViewGroup redFlagsContainer = attentionFlagDialogView.findViewById(R.id.red_flags_container); + ViewGroup yellowFlagsContainer = attentionFlagDialogView.findViewById(R.id.yellow_flags_container); + + redFlagsContainer.removeAllViews(); + yellowFlagsContainer.removeAllViews(); + + int yellowFlagCount = 0; + int redFlagCount = 0; + + for (AttentionFlag flag : attentionFlags) { + if (flag.isRedFlag()) { + LinearLayout redRow = (LinearLayout) LayoutInflater.from(this) + .inflate(R.layout.alert_dialog_attention_flag_row_red, redFlagsContainer, false); + ((TextView) redRow.getChildAt(1)).setText(flag.getTitle()); + redFlagsContainer.addView(redRow); + redFlagCount += 1; + } else { + + LinearLayout yellowRow = (LinearLayout) LayoutInflater.from(this) + .inflate(R.layout.alert_dialog_attention_flag_row_yellow, yellowFlagsContainer, false); + ((TextView) yellowRow.getChildAt(1)).setText(flag.getTitle()); + yellowFlagsContainer.addView(yellowRow); + yellowFlagCount += 1; + } + } + + ((View) redFlagsContainer.getParent()).setVisibility(redFlagCount > 0 ? View.VISIBLE : View.GONE); + ((View) yellowFlagsContainer.getParent()).setVisibility(yellowFlagCount > 0 ? View.VISIBLE : View.GONE); + + getAttentionFlagAlertDialog().show(); + } + + public AlertDialog getAttentionFlagAlertDialog() { + return attentionFlagAlertDialog; + } + + public void setAttentionFlagAlertDialog(AlertDialog attentionFlagAlertDialog) { + this.attentionFlagAlertDialog = attentionFlagAlertDialog; + } + + @Override + public void onPause() { + EventBus.getDefault().unregister(this); + super.onPause(); + } + + @Subscribe(threadMode = ThreadMode.MAIN) + public void showProgressDialogHandler(ShowProgressDialogEvent showProgressDialogEvent) { + if (showProgressDialogEvent != null) { + showProgressDialog(R.string.saving_dialog_title); + } + } + + @Subscribe(sticky = true, threadMode = ThreadMode.MAIN) + public void removePatientHandler(PatientRemovedEvent event) { + if (event != null) { + Utils.removeStickyEvent(event); + refreshList(FetchStatus.fetched); + hideProgressDialog(); + } + } + + @Override + public void startRegistration() { + startFormActivity(ConstantsUtils.JsonFormUtils.ANC_REGISTER, null, ""); + } + + public void showRecordBirthPopUp(CommonPersonObjectClient client) { + //This is required + getIntent() + .putExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID, client.getColumnmaps().get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID)); + + recordBirthAlertDialog.setMessage(String.format(this.getString(R.string.record_birth_popup_message), + Utils.getGestationAgeFromEDDate(client.getColumnmaps().get(DBConstantsUtils.KeyUtils.EDD)), + Utils.convertDateFormat(Utils.dobStringToDate(client.getColumnmaps().get(DBConstantsUtils.KeyUtils.EDD)), + dateFormatter), Utils.getDuration(client.getColumnmaps().get(DBConstantsUtils.KeyUtils.EDD)), + client.getColumnmaps().get(DBConstantsUtils.KeyUtils.FIRST_NAME))); + recordBirthAlertDialog.show(); + } + + public void setAdvancedSearch(boolean advancedSearch) { + isAdvancedSearch = advancedSearch; + } + + public void setAdvancedSearchFormData(HashMap advancedSearchFormData) { + this.advancedSearchFormData = advancedSearchFormData; + } +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseProfileActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseProfileActivity.java index 4f8835166..b4338fa26 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseProfileActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/BaseProfileActivity.java @@ -16,6 +16,7 @@ import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.AppConfig; import org.smartregister.anc.library.R; import org.smartregister.anc.library.contract.ProfileContract; import org.smartregister.anc.library.event.ClientDetailsFetchedEvent; @@ -25,6 +26,7 @@ import org.smartregister.anc.library.util.ConstantsUtils; import org.smartregister.anc.library.util.Utils; import org.smartregister.repository.AllSharedPreferences; +import org.smartregister.util.LangUtils; import org.smartregister.view.activity.SecuredActivity; import timber.log.Timber; @@ -49,6 +51,7 @@ public abstract class BaseProfileActivity extends SecuredActivity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + setDefaultLocale(); setContentView(getViewLayoutId()); findViewById(R.id.btn_profile_registration_info).setOnClickListener(this); @@ -171,4 +174,9 @@ public ProgressDialog getProgressDialog() { public void setProgressDialog(ProgressDialog progressDialog) { this.progressDialog = progressDialog; } + + public void setDefaultLocale() { + LangUtils.saveLanguage(getApplication(), AppConfig.DefaultLocale.getLanguage()); + Utils.saveLanguage(AppConfig.DefaultLocale.getLanguage()); + } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactJsonFormActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactJsonFormActivity.java index 9f08a0628..7d1ccd3fd 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactJsonFormActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactJsonFormActivity.java @@ -3,6 +3,8 @@ import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; +import android.util.Log; +import android.view.View; import androidx.fragment.app.Fragment; import androidx.localbroadcastmanager.content.LocalBroadcastManager; @@ -29,6 +31,7 @@ import java.util.Arrays; import java.util.HashMap; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -83,6 +86,12 @@ public void init(String json) { globalValues = new HashMap<>(); } + if (getIntent() != null) { + String entityId = getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID); + globalValues.put("entity_id", entityId); + } + Log.v("PAMPAM", globalValues.toString()); + rulesEngineFactory = new AncRulesEngineFactory(this, globalValues, getmJSONObject()); setRulesEngineFactory(rulesEngineFactory); @@ -196,6 +205,13 @@ public void onResume() { } } + @Override + public JSONObject getObjectUsingAddress(String[] address, boolean popup) throws JSONException { + JSONObject result = super.getObjectUsingAddress(address, popup); + if (result == null) return new JSONObject(); + return result; + } + /** * Finds gets the currently selected dangers signs on the quick change page and sets the none {@link Boolean} and other * {@link Boolean} so as to identify times to show the refer and proceed buttons on quick check diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactSummaryFinishActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactSummaryFinishActivity.java index a40802833..c17803cc7 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactSummaryFinishActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ContactSummaryFinishActivity.java @@ -96,6 +96,7 @@ private void setUpViews() { protected void loadContactSummaryData() { try { + Facts thefacts = facts; new LoadContactSummaryDataTask(this, getIntent(), mProfilePresenter, facts, baseEntityId).execute(); } catch (Exception e) { Timber.e(e, "%s loadContactSummaryData()", this.getClass().getCanonicalName()); @@ -295,15 +296,10 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in } protected boolean isPermissionGranted() { - if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) - { - if(Environment.isExternalStorageManager()) - return true; - else - return false; - } - else - return PermissionUtils.isPermissionGranted(this, Manifest.permission.WRITE_EXTERNAL_STORAGE, PermissionUtils.WRITE_EXTERNAL_STORAGE_REQUEST_CODE); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + return Environment.isExternalStorageManager(); + } else + return PermissionUtils.isPermissionGranted(this, Manifest.permission.WRITE_EXTERNAL_STORAGE, PermissionUtils.WRITE_EXTERNAL_STORAGE_REQUEST_CODE); } public List getYamlConfigList() { diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/MainContactActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/MainContactActivity.java index e7298ea2c..aaaadaff9 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/MainContactActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/MainContactActivity.java @@ -9,6 +9,7 @@ import com.google.gson.reflect.TypeToken; import com.vijay.jsonwizard.constants.JsonFormConstants; import com.vijay.jsonwizard.rules.RuleConstant; +import com.vijay.jsonwizard.utils.FormUtils; import org.apache.commons.lang3.StringUtils; import org.json.JSONArray; @@ -16,6 +17,7 @@ import org.json.JSONObject; import org.smartregister.anc.library.AncLibrary; import org.smartregister.anc.library.R; +import org.smartregister.anc.library.constants.ANCJsonFormConstants; import org.smartregister.anc.library.contract.ContactContract; import org.smartregister.anc.library.domain.Contact; import org.smartregister.anc.library.model.PartialContact; @@ -55,6 +57,7 @@ public class MainContactActivity extends BaseContactActivity implements ContactC private List globalValueFields = new ArrayList<>(); private List editableFields = new ArrayList<>(); private String baseEntityId; + private String womanOpenSRPId; private String womanAge = ""; private final List invisibleRequiredFields = new ArrayList<>(); private final String[] contactForms = new String[]{ConstantsUtils.JsonFormUtils.ANC_QUICK_CHECK, ConstantsUtils.JsonFormUtils.ANC_PROFILE, @@ -72,6 +75,7 @@ protected void onResume() { (Map) getIntent().getSerializableExtra(ConstantsUtils.IntentKeyUtils.CLIENT_MAP); if (womanDetails != null && womanDetails.size() > 0) { womanAge = String.valueOf(Utils.getAgeFromDate(womanDetails.get(DBConstantsUtils.KeyUtils.DOB))); + womanOpenSRPId = womanDetails.get(DBConstantsUtils.KeyUtils.ANC_ID); } if (!presenter.baseEntityIdExists()) { presenter.setBaseEntityId(baseEntityId); @@ -79,8 +83,10 @@ protected void onResume() { initializeMainContactContainers(); + int requiredCount = getRequiredCountTotal(); + //Enable/Disable finalize button - findViewById(R.id.finalize_contact).setEnabled(getRequiredCountTotal() == 0); + findViewById(R.id.finalize_contact).setEnabled(requiredCount == 0); } private void initializeMainContactContainers() { @@ -108,12 +114,8 @@ private void initializeMainContactContainers() { quickCheck.setBackground(R.drawable.quick_check_bg); quickCheck.setWizard(false); quickCheck.setHideSaveLabel(true); - if (requiredFieldsMap.containsKey(quickCheck.getName())) { - Integer quickCheckFields = requiredFieldsMap.get(quickCheck.getName()); - quickCheck.setRequiredFields(quickCheckFields != null ? quickCheckFields : 0); - } - quickCheck.setFormName(ConstantsUtils.JsonFormUtils.ANC_QUICK_CHECK); + quickCheck.setRequiredFields(0); contacts.add(quickCheck); Contact profile = new Contact(); @@ -122,8 +124,8 @@ private void initializeMainContactContainers() { profile.setBackground(R.drawable.profile_bg); profile.setActionBarBackground(R.color.contact_profile_actionbar); profile.setNavigationBackground(R.color.contact_profile_navigation); - setRequiredFields(profile); profile.setFormName(ConstantsUtils.JsonFormUtils.ANC_PROFILE); + setRequiredFields(profile); contacts.add(profile); Contact symptomsAndFollowUp = new Contact(); @@ -132,8 +134,8 @@ private void initializeMainContactContainers() { symptomsAndFollowUp.setBackground(R.drawable.symptoms_bg); symptomsAndFollowUp.setActionBarBackground(R.color.contact_symptoms_actionbar); symptomsAndFollowUp.setNavigationBackground(R.color.contact_symptoms_navigation); - setRequiredFields(symptomsAndFollowUp); symptomsAndFollowUp.setFormName(ConstantsUtils.JsonFormUtils.ANC_SYMPTOMS_FOLLOW_UP); + setRequiredFields(symptomsAndFollowUp); contacts.add(symptomsAndFollowUp); Contact physicalExam = new Contact(); @@ -142,8 +144,8 @@ private void initializeMainContactContainers() { physicalExam.setBackground(R.drawable.physical_exam_bg); physicalExam.setActionBarBackground(R.color.contact_exam_actionbar); physicalExam.setNavigationBackground(R.color.contact_exam_navigation); - setRequiredFields(physicalExam); physicalExam.setFormName(ConstantsUtils.JsonFormUtils.ANC_PHYSICAL_EXAM); + setRequiredFields(physicalExam); contacts.add(physicalExam); Contact tests = new Contact(); @@ -152,8 +154,8 @@ private void initializeMainContactContainers() { tests.setBackground(R.drawable.tests_bg); tests.setActionBarBackground(R.color.contact_tests_actionbar); tests.setNavigationBackground(R.color.contact_tests_navigation); - setRequiredFields(tests); tests.setFormName(ConstantsUtils.JsonFormUtils.ANC_TEST); + setRequiredFields(tests); contacts.add(tests); Contact counsellingAndTreatment = new Contact(); @@ -162,8 +164,8 @@ private void initializeMainContactContainers() { counsellingAndTreatment.setBackground(R.drawable.counselling_bg); counsellingAndTreatment.setActionBarBackground(R.color.contact_counselling_actionbar); counsellingAndTreatment.setNavigationBackground(R.color.contact_counselling_navigation); - setRequiredFields(counsellingAndTreatment); counsellingAndTreatment.setFormName(ConstantsUtils.JsonFormUtils.ANC_COUNSELLING_TREATMENT); + setRequiredFields(counsellingAndTreatment); contacts.add(counsellingAndTreatment); contactAdapter.setContacts(contacts); @@ -185,7 +187,7 @@ private int getRequiredCountTotal() { count += entry.getValue(); } } - return count; + return count <= 0 ? 0 : count; } private void loadContactGlobalsConfig() throws IOException { @@ -201,6 +203,7 @@ private void loadContactGlobalsConfig() throws IOException { private void process(String[] mainContactForms) { //Fetch and load previously saved values try { + if (contactNo > 1 && !PatientRepository.isFirstVisit(baseEntityId)) { for (String formEventType : new ArrayList<>(Arrays.asList(mainContactForms))) { if (eventToFileMap.containsValue(formEventType)) { @@ -243,8 +246,8 @@ private void process(String[] mainContactForms) { } private void setRequiredFields(Contact contact) { - if (requiredFieldsMap != null && contact != null && requiredFieldsMap.containsKey(contact.getName())) { - contact.setRequiredFields(requiredFieldsMap.get(contact.getName())); + if (requiredFieldsMap != null && contact != null && requiredFieldsMap.containsKey(contact.getFormName())) { + contact.setRequiredFields(requiredFieldsMap.get(contact.getFormName())); } } @@ -354,6 +357,7 @@ private boolean getFieldVisibility(JSONObject field) { } private void updateFieldRequiredCount(JSONObject object, JSONObject fieldObject, boolean isRequiredField) throws JSONException { + if (isRequiredField && (!fieldObject.has(JsonFormConstants.VALUE) || TextUtils.isEmpty(fieldObject.getString(JsonFormConstants.VALUE)))) { Integer requiredFieldCount = requiredFieldsMap.get(object.getString(ConstantsUtils.JsonFormKeyUtils.ENCOUNTER_TYPE)); @@ -605,26 +609,37 @@ private void preProcessDefaultValues(JSONObject object) { private void updateDefaultValues(JSONArray stepArray, int i, JSONObject fieldObject) throws JSONException { if (defaultValueFields.contains(fieldObject.getString(JsonFormConstants.KEY))) { - + String secondaryValue = null; if (!fieldObject.has(JsonFormConstants.VALUE) || TextUtils.isEmpty(fieldObject.getString(JsonFormConstants.VALUE))) { String defaultKey = fieldObject.getString(JsonFormConstants.KEY); String mapValue = getMapValue(defaultKey); - + if(fieldObject.has(ANCJsonFormConstants.KeyConstants.SECONDARY_VALUE_FIELD)) + secondaryValue = getMapValue(fieldObject.getString(ANCJsonFormConstants.KeyConstants.SECONDARY_VALUE_FIELD)); if (mapValue != null) { - fieldObject.put(JsonFormConstants.VALUE, mapValue); - fieldObject.put(JsonFormConstants.EDITABLE, editableFields.contains(defaultKey)); - fieldObject.put(JsonFormConstants.READ_ONLY, editableFields.contains(defaultKey)); + if(mapValue.startsWith("{")) { + fieldObject.put(JsonFormConstants.VALUE, new JSONObject(mapValue)); + } + else { + fieldObject.put(JsonFormConstants.VALUE, mapValue); + fieldObject.put(JsonFormConstants.EDITABLE, editableFields.contains(defaultKey)); + fieldObject.put(JsonFormConstants.READ_ONLY, editableFields.contains(defaultKey)); + } } } if (fieldObject.has(JsonFormConstants.OPTIONS_FIELD_NAME)) { boolean addDefaults = true; - for (int m = 0; m < fieldObject.getJSONArray(JsonFormConstants.OPTIONS_FIELD_NAME).length(); m++) { String optionValue; + JSONObject optionsObject = fieldObject.getJSONArray(JsonFormConstants.OPTIONS_FIELD_NAME).getJSONObject(m); + if(optionsObject.has(JsonFormConstants.CONTENT_WIDGET) && secondaryValue != null) + { + JSONObject secondaryValueObject = ANCJsonFormUtils.populateSecondaryValues(secondaryValue,optionsObject); + optionsObject.put(JsonFormConstants.SECONDARY_VALUE,new JSONArray().put(secondaryValueObject)); + } if (fieldObject.getJSONArray(JsonFormConstants.OPTIONS_FIELD_NAME).getJSONObject(m) .has(JsonFormConstants.VALUE)) { optionValue = fieldObject.getJSONArray(JsonFormConstants.OPTIONS_FIELD_NAME).getJSONObject(m) @@ -657,6 +672,16 @@ private void updateDefaultValues(JSONArray stepArray, int i, JSONObject fieldObj } } } + if (fieldObject.getString(JsonFormConstants.KEY).equals(ANCJsonFormConstants.KeyConstants.OPTIBP_BUTTON) + || fieldObject.getString(JsonFormConstants.KEY).equals(ANCJsonFormConstants.KeyConstants.OPTIBP_BUTTON_SECOND)) { + if (fieldObject.has(JsonFormConstants.OptibpConstants.OPTIBP_KEY_DATA)) { + fieldObject.remove(JsonFormConstants.OptibpConstants.OPTIBP_KEY_DATA); + } + String optibpButtonKey = fieldObject.getString(JsonFormConstants.KEY).equals(ANCJsonFormConstants.KeyConstants.OPTIBP_BUTTON) ? ANCJsonFormConstants.KeyConstants.OPTIBP_BUTTON : ANCJsonFormConstants.KeyConstants.OPTIBP_BUTTON_SECOND; + String previousContactBpValue = getMapValue(optibpButtonKey) == null ? "" : getMapValue(optibpButtonKey); + JSONObject optiBPData = FormUtils.createOptiBPDataObject(baseEntityId, womanOpenSRPId, previousContactBpValue); + fieldObject.put(JsonFormConstants.OptibpConstants.OPTIBP_KEY_DATA, optiBPData); + } } private void getValueMap(JSONObject object) throws JSONException { @@ -796,6 +821,7 @@ protected void onPause() { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK && data != null) { formInvalidFields = data.getStringExtra("formInvalidFields"); } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/PreviousContactsDetailsActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/PreviousContactsDetailsActivity.java index 9350e062f..954c5129a 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/PreviousContactsDetailsActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/PreviousContactsDetailsActivity.java @@ -151,7 +151,7 @@ public void loadPreviousContactsDetails(Map> allContactFacts if (factsToUpdate.asMap().get(ConstantsUtils.ATTENTION_FLAG_FACTS) != null) { try { - JSONObject jsonObject = new JSONObject((String) Objects.requireNonNull(factsToUpdate.asMap().get(ConstantsUtils.ATTENTION_FLAG_FACTS))); + JSONObject jsonObject = new JSONObject((String) factsToUpdate.asMap().get(ConstantsUtils.ATTENTION_FLAG_FACTS)); Iterator keys = jsonObject.keys(); while (keys.hasNext()) { @@ -172,8 +172,8 @@ public void loadPreviousContactsDetails(Map> allContactFacts addOtherRuleObjects(factsToUpdate); addAttentionFlagsRuleObjects(factsToUpdate); - Date lastContactDate = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) - .parse(String.valueOf(factsToUpdate.asMap().get(ConstantsUtils.CONTACT_DATE))); + Date lastContactDate = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault()) + .parse(String.valueOf(factsToUpdate.asMap().get("visit_date"))); String displayContactDate = new SimpleDateFormat("dd MMM " + "yyyy", Locale.getDefault()) .format(lastContactDate); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ProfileActivity.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ProfileActivity.java index b1aef53a1..b83f24b42 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ProfileActivity.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/activity/ProfileActivity.java @@ -28,6 +28,7 @@ import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.AppConfig; import org.smartregister.anc.library.R; import org.smartregister.anc.library.adapter.ProfileViewPagerAdapter; import org.smartregister.anc.library.contract.ProfileContract; @@ -43,6 +44,7 @@ import org.smartregister.anc.library.util.Utils; import org.smartregister.anc.library.view.CopyToClipboardDialog; import org.smartregister.repository.AllSharedPreferences; +import org.smartregister.util.LangUtils; import org.smartregister.util.PermissionUtils; import org.smartregister.view.activity.BaseProfileActivity; @@ -76,9 +78,15 @@ protected void onCreation() { super.onCreation(); } + public void setDefaultLocale() { + LangUtils.saveLanguage(getApplication(), AppConfig.DefaultLocale.getLanguage()); + Utils.saveLanguage(AppConfig.DefaultLocale.getLanguage()); + } + @Override protected void onResumption() { super.onResumption(); + setDefaultLocale(); String baseEntityId = getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID); registerEventBus(); ((ProfilePresenter) presenter).refreshProfileView(baseEntityId); @@ -220,11 +228,13 @@ public boolean onOptionsItemSelected(final MenuItem item) { Utils.navigateToHomeRegister(this, false, AncLibrary.getInstance().getActivityConfiguration().getHomeRegisterActivityClass()); } else { String contactButtonText = getString(R.string.start_contact); + String lastVisitDate = detailMap.get(DBConstantsUtils.KeyUtils.LAST_VISIT_DATE); + Integer nextContact = Integer.valueOf(detailMap.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT)); - if (buttonAlertStatus.equals(ConstantsUtils.AlertStatusUtils.TODAY)) { - contactButtonText = String.format(getString(R.string.contact_recorded_today_no_break), Utils.getTodayContact(detailMap.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT))); - } else if (buttonAlertStatus.equals(ConstantsUtils.AlertStatusUtils.IN_PROGRESS)) { - contactButtonText = String.format(getString(R.string.continue_contact), Integer.valueOf(detailMap.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT))); + if (buttonAlertStatus.equals(ConstantsUtils.AlertStatusUtils.IN_PROGRESS)) { + contactButtonText = String.format(getString(R.string.continue_contact), nextContact); + } else if (lastVisitDate != null) { + contactButtonText = String.format(getString(R.string.contact_number), nextContact - 1) + " (" + lastVisitDate + ")"; } attachAlertDialog(contactButtonText); @@ -353,13 +363,12 @@ public void setProfileID(String ancId) { @Override public void setProfileAge(String age) { - ageView.setText("AGE " + age); - + ageView.setText(age); } @Override public void setProfileGestationAge(String gestationAge) { - gestationAgeView.setText(gestationAge != null ? "GA: " + gestationAge + " WEEKS" : "GA"); + gestationAgeView.setText(gestationAge != null ? gestationAge : "-"); } @Override diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactScheduleAdapter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactScheduleAdapter.java index 1a8622da3..e1961561a 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactScheduleAdapter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactScheduleAdapter.java @@ -57,8 +57,8 @@ public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) { .setText(new SimpleDateFormat("dd MMM yyyy", Locale.getDefault()).format(locateDate)); String formattedEdd = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(locateDate); String timeAway = String.valueOf(generateTimeAway(formattedEdd)); - viewHolder.timeAwayDisplay - .setText(String.format(context.getResources().getString(R.string.timeline_away), timeAway)); + // viewHolder.timeAwayDisplay.setText(String.format(context.getResources().getString(R.string.timeline_away), timeAway)); + viewHolder.timeAwayDisplay.setVisibility(View.GONE); } } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactSummaryFinishAdapter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactSummaryFinishAdapter.java index ad35e5767..d43d1c072 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactSummaryFinishAdapter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ContactSummaryFinishAdapter.java @@ -25,12 +25,14 @@ public class ContactSummaryFinishAdapter extends RecyclerView.Adapter mData; private LayoutInflater mInflater; private Facts facts; + private Context context; // data is passed into the constructor public ContactSummaryFinishAdapter(Context context, List data, Facts facts) { this.mInflater = LayoutInflater.from(context); this.mData = data; this.facts = facts; + this.context = context; } // inflates the row layout from xml when needed @@ -43,7 +45,7 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { // binds the data to the TextView in each row @Override public void onBindViewHolder(ViewHolder holder, int position) { - holder.sectionHeader.setText(processUnderscores(mData.get(position).getGroup())); + holder.sectionHeader.setText(getString(mData.get(position).getGroup())); List fields = mData.get(position).getFields(); StringBuilder outputBuilder = new StringBuilder(); for (YamlConfigItem yamlConfigItem : fields) { @@ -70,6 +72,11 @@ public void onBindViewHolder(ViewHolder holder, int position) { } + private String getString(String key) { + int identifier = context.getResources().getIdentifier(key, "string", context.getPackageName()); + return context.getString(identifier); + } + // total number of rows @Override public int getItemCount() { diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ProfileOverviewAdapter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ProfileOverviewAdapter.java index 9ee669421..fc52b5ed5 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ProfileOverviewAdapter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/adapter/ProfileOverviewAdapter.java @@ -3,6 +3,7 @@ import android.app.Activity; import android.content.Context; import android.text.TextUtils; +import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -79,7 +80,8 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) { if (!TextUtils.isEmpty(mData.get(position).getGroup())) { - holder.sectionHeader.setText(processUnderscores(mData.get(position).getGroup())); + String headerKey = mData.get(position).getGroup(); + holder.sectionHeader.setText(getString(headerKey)); holder.sectionHeader.setVisibility(View.VISIBLE); } else { @@ -88,7 +90,8 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) { } if (!TextUtils.isEmpty(mData.get(position).getSubGroup())) { - holder.subSectionHeader.setText(processUnderscores(mData.get(position).getSubGroup())); + String headerKey = mData.get(position).getSubGroup(); + holder.subSectionHeader.setText(getString(headerKey)); holder.subSectionHeader.setVisibility(View.VISIBLE); } else { holder.subSectionHeader.setVisibility(View.GONE); @@ -140,6 +143,11 @@ private String processUnderscores(String string) { return string.replace("_", " ").toUpperCase(); } + private String getString(String key) { + int identifier = context.getResources().getIdentifier(key, "string", context.getPackageName()); + return context.getString(identifier); + } + private Template getTemplate(String rawTemplate) { Template template = new Template(); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/ANCJsonFormConstants.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/ANCJsonFormConstants.java new file mode 100644 index 000000000..c2d4f5d99 --- /dev/null +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/ANCJsonFormConstants.java @@ -0,0 +1,15 @@ +package org.smartregister.anc.library.constants; + +import com.vijay.jsonwizard.constants.JsonFormConstants; + +public class ANCJsonFormConstants extends JsonFormConstants { + + public static class KeyConstants { + public static final String OPTIBP_BUTTON = "record_bp_using_optibp_button"; + public static final String OPTIBP_BUTTON_SECOND = "record_bp_using_optibp_2nd_reading_button"; + public static final String SECONDARY_VALUE_FIELD = "secondary_value_field"; + + public static final String SPECIFY_WIDGET = "specify_widget"; + } + +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/Constants.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/Constants.java new file mode 100644 index 000000000..e3483f71c --- /dev/null +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/Constants.java @@ -0,0 +1,17 @@ +package org.smartregister.anc.library.constants; + +import android.os.LocaleList; + +import java.util.Locale; + +public class Constants { + + public static class Locales { + public static final Locale ENGLISH_US = LocaleList.forLanguageTags("en-US").get(0); + public static final Locale INDONESIAN_ID = LocaleList.forLanguageTags("in-ID").get(0); + public static final Locale FRANCE_RW = LocaleList.forLanguageTags("fr-RW").get(0); + public static final Locale NEPALI_NP = LocaleList.forLanguageTags("ne-NP").get(0); + public static final Locale PORTUGESE_BR = LocaleList.forLanguageTags("pt-BR").get(0); + } + +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/FormConstants.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/FormConstants.java new file mode 100644 index 000000000..4a8e6a564 --- /dev/null +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/constants/FormConstants.java @@ -0,0 +1,19 @@ +package org.smartregister.anc.library.constants; + +public class FormConstants { + + public final static class Client { + + // Identifiers + public static final String IDENTIFIER_UID = "uid"; + public static final String IDENTIFIER_SSN = "ssn"; + + // Attributes + public static final String ATTRIBUTE_UID_UNKNOWN = "uid_unknown"; + public static final String ATTRIBUTE_UID_UNKNOWN_REASON = "uid_unknown_reason"; + public static final String ATTRIBUTE_PHONE_UNKNOWN = "phone_number_unknown"; + public static final String ATTRIBUTE_PHONE_UNKNOWN_REASON = "phone_number_unknown_reason"; + + } + +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/AdvancedSearchContract.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/AdvancedSearchContract.java index d14908d29..8c4aedc16 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/AdvancedSearchContract.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/AdvancedSearchContract.java @@ -1,5 +1,6 @@ package org.smartregister.anc.library.contract; +import android.content.Context; import android.database.Cursor; import org.smartregister.domain.Response; @@ -28,8 +29,7 @@ interface Model extends RegisterFragmentContract.Model { Map createEditMap(String firstName, String lastName, String ancId, String edd, String dob, String phoneNumber, String alternateContact, boolean isLocal); - String createSearchString(String firstName, String lastName, String ancId, String edd, String dob, - String phoneNumber, String alternateContact); + String createSearchString(Context context, String firstName, String lastName, String ancId, String edd, String dob, String phoneNumber, String alternateContact); String getMainConditionString(Map editMap); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/RegisterFragmentContract.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/RegisterFragmentContract.java index 964aebc57..40f76c00b 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/RegisterFragmentContract.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/contract/RegisterFragmentContract.java @@ -1,5 +1,7 @@ package org.smartregister.anc.library.contract; +import android.content.Context; + import org.json.JSONArray; import org.smartregister.anc.library.cursor.AdvancedMatrixCursor; import org.smartregister.configurableviews.model.Field; @@ -32,7 +34,7 @@ interface Presenter extends BaseRegisterFragmentContract.Presenter { interface Model { - RegisterConfiguration defaultRegisterConfiguration(); + RegisterConfiguration defaultRegisterConfiguration(Context context); ViewConfiguration getViewConfiguration(String viewConfigurationIdentifier); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ContactWizardJsonFormFragment.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ContactWizardJsonFormFragment.java index 22ebc7b55..2ad4357cd 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ContactWizardJsonFormFragment.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ContactWizardJsonFormFragment.java @@ -21,7 +21,6 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.ActionBar; - import com.vijay.jsonwizard.activities.FormConfigurationJsonFormActivity; import com.vijay.jsonwizard.fragments.JsonWizardFormFragment; import com.vijay.jsonwizard.interactors.JsonFormInteractor; diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/HomeRegisterFragment.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/HomeRegisterFragment.java index 47c09e15b..f216dd7bb 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/HomeRegisterFragment.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/HomeRegisterFragment.java @@ -40,6 +40,7 @@ import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Set; @@ -109,7 +110,7 @@ public void setupViews(View view) { } //Risk view - View attentionFlag = view.findViewById(R.id.risk); + View attentionFlag = view.findViewById(R.id.red_flag); if (attentionFlag != null) { attentionFlag.setOnClickListener(registerActionHandler); } @@ -154,7 +155,7 @@ protected void onViewClicked(View view) { if (view.getTag() != null && view.getTag(R.id.VIEW_ID) == CLICK_VIEW_NORMAL) { Utils.navigateToProfile(getActivity(), (HashMap) pc.getColumnmaps()); } else if (view.getTag() != null && view.getTag(R.id.VIEW_ID) == CLICK_VIEW_ALERT_STATUS) { - if (Integer.valueOf(view.getTag(R.id.GESTATION_AGE).toString()) >= ConstantsUtils.DELIVERY_DATE_WEEKS) { + if (Integer.parseInt(view.getTag(R.id.GESTATION_AGE).toString()) >= ConstantsUtils.DELIVERY_DATE_WEEKS) { baseHomeRegisterActivity.showRecordBirthPopUp((CommonPersonObjectClient) view.getTag()); } else { String baseEntityId = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.BASE_ENTITY_ID, false); @@ -179,7 +180,7 @@ public void onSyncInProgress(FetchStatus fetchStatus) { @Override public void showNotFoundPopup(String whoAncId) { NoMatchDialogFragment - .launchDialog((BaseRegisterActivity) Objects.requireNonNull(getActivity()), SecuredNativeSmartRegisterFragment.DIALOG_TAG, whoAncId); + .launchDialog((BaseRegisterActivity) requireActivity(), SecuredNativeSmartRegisterFragment.DIALOG_TAG, whoAncId); } @Override diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/MeFragment.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/MeFragment.java index 0b6e603cb..c4485f1db 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/MeFragment.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/MeFragment.java @@ -2,6 +2,7 @@ import android.content.Intent; import android.os.Bundle; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,8 +17,10 @@ import org.smartregister.anc.library.AncLibrary; import org.smartregister.anc.library.R; import org.smartregister.anc.library.activity.AncP2pModeSelectActivity; +import org.smartregister.anc.library.activity.BaseHomeRegisterActivity; import org.smartregister.anc.library.activity.PopulationCharacteristicsActivity; import org.smartregister.anc.library.activity.SiteCharacteristicsActivity; +import org.smartregister.anc.library.constants.Constants; import org.smartregister.anc.library.presenter.MePresenter; import org.smartregister.anc.library.util.Utils; import org.smartregister.util.LangUtils; @@ -36,7 +39,7 @@ public class MeFragment extends org.smartregister.view.fragment.MeFragment imple private RelativeLayout languageSwitcherSection; private RelativeLayout p2pSyncSetion; private TextView languageSwitcherText; - private final Map locales = new HashMap<>(); + private Locale[] locales; private String[] languages; @Nullable @@ -118,9 +121,7 @@ private void languageSwitcherDialog() { if (MeFragment.this.getActivity() != null) { String selectedLanguage = languages[position]; languageSwitcherText.setText(String.format(MeFragment.this.getActivity().getResources().getString(R.string.default_language_string), selectedLanguage)); - - saveLanguage(selectedLanguage); - MeFragment.this.reloadClass(); + saveLanguage(locales[position]); AncLibrary.getInstance().notifyAppContextChange(); } }); @@ -130,52 +131,35 @@ private void languageSwitcherDialog() { } } - private void saveLanguage(String selectedLanguage) { - if (MeFragment.this.getActivity() != null && StringUtils.isNotBlank(selectedLanguage)) { - Locale selectedLanguageLocale = locales.get(selectedLanguage); - if (selectedLanguageLocale != null) { - LangUtils.saveLanguage(MeFragment.this.getActivity().getApplication(), getFullLanguage(selectedLanguageLocale)); - } else { - Timber.i("Language could not be set"); + private void saveLanguage(Locale selectedLocale) { + if (MeFragment.this.getActivity() != null && selectedLocale != null) { + if (getActivity() instanceof BaseHomeRegisterActivity) { + BaseHomeRegisterActivity parentActivity = (BaseHomeRegisterActivity) getActivity(); + parentActivity.setLocale(selectedLocale); } } } - private void reloadClass() { - if (getActivity() != null) { - Intent intent = getActivity().getIntent(); - getActivity().finish(); - getActivity().startActivity(intent); - } - } - private void registerLanguageSwitcher() { if (getActivity() != null) { - addLanguages(); - - languages = new String[locales.size()]; - Locale current = getActivity().getResources().getConfiguration().locale; - int x = 0; - for (Map.Entry language : locales.entrySet()) { - languages[x] = language.getKey(); //Update the languages strings array with the languages to be displayed on the alert dialog - x++; - - if (getFullLanguage(current).equalsIgnoreCase(getFullLanguage(language.getValue()))) { - languageSwitcherText.setText(String.format(getActivity().getResources().getString(R.string.default_language_string), language.getKey())); - } + setLocaleList(); + languages = new String[locales.length]; + Locale currentLocale = getActivity().getResources().getConfiguration().getLocales().get(0); + for (int index = 0; index < locales.length; index++) { + languages[index] = locales[index].getDisplayLanguage() + " (" + locales[index].getDisplayCountry() + ")"; } + languageSwitcherText.setText(String.format(getActivity().getResources().getString(R.string.default_language_string), currentLocale.getDisplayLanguage())); } } - private String getFullLanguage(Locale locale) { - return StringUtils.isNotEmpty(locale.getCountry()) ? locale.getLanguage() + "_" + locale.getCountry() : locale.getLanguage(); - } - - private void addLanguages() { - locales.put(getString(R.string.english_language), Locale.ENGLISH); - locales.put(getString(R.string.french_language), Locale.FRENCH); - locales.put(getString(R.string.portuguese_brazil_language), new Locale("pt")); - locales.put(getString(R.string.bahasa_indonesia_language), new Locale("ind")); + private void setLocaleList() { + locales = new Locale[]{ + Constants.Locales.ENGLISH_US, + Constants.Locales.FRANCE_RW, + Constants.Locales.INDONESIAN_ID, + Constants.Locales.NEPALI_NP, + Constants.Locales.PORTUGESE_BR, + }; } } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ProfileContactsFragment.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ProfileContactsFragment.java index 52e453669..46531ad4b 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ProfileContactsFragment.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/fragment/ProfileContactsFragment.java @@ -14,8 +14,6 @@ import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; - -import org.apache.commons.lang3.StringUtils; import org.jeasy.rules.api.Facts; import org.smartregister.anc.library.AncLibrary; import org.smartregister.anc.library.R; @@ -170,10 +168,10 @@ private void initializeLastContactDetails(HashMap clientDetails) addTestsRuleObjects(facts); - String contactDate = (String) facts.asMap().get(ConstantsUtils.CONTACT_DATE); + String contactDate = (String) facts.asMap().get("visit_date"); String displayContactDate = ""; if (!TextUtils.isEmpty(contactDate)) { - Date lastContactDate = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).parse(contactDate); + Date lastContactDate = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault()).parse(contactDate); displayContactDate = new SimpleDateFormat("dd MMM " + "yyyy", Locale.getDefault()) .format(lastContactDate); } @@ -226,13 +224,11 @@ private void addOtherRuleObjects(Facts facts) throws IOException { } } - private void addAttentionFlagsRuleObjects(Facts facts) throws IOException { + private void addAttentionFlagsRuleObjects(Facts facts) { Iterable attentionFlagsRuleObjects = AncLibrary.getInstance().readYaml(FilePathUtils.FileUtils.ATTENTION_FLAGS); - for (Object ruleObject : attentionFlagsRuleObjects) { YamlConfig attentionFlagConfig = (YamlConfig) ruleObject; for (YamlConfigItem yamlConfigItem : attentionFlagConfig.getFields()) { - if (AncLibrary.getInstance().getAncRulesEngineHelper() .getRelevance(facts, yamlConfigItem.getRelevance())) { lastContactDetails.add(new YamlConfigWrapper(null, null, yamlConfigItem)); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineFactory.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineFactory.java index 704c55a5f..5d5b201e3 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineFactory.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineFactory.java @@ -2,47 +2,31 @@ import android.content.Context; -import com.vijay.jsonwizard.rules.RuleConstant; + import com.vijay.jsonwizard.rules.RulesEngineFactory; import org.jeasy.rules.api.Facts; -import org.jeasy.rules.api.Rule; import org.json.JSONObject; import java.util.Map; public class AncRulesEngineFactory extends RulesEngineFactory { - private Map globalValues; - private AncRulesEngineHelper ancRulesEngineHelper; - private String selectedRuleName; + + private final AncRulesEngineHelper ancRulesEngineHelper; public AncRulesEngineFactory(Context context, Map globalValues, JSONObject mJSONObject) { super(context, globalValues); this.ancRulesEngineHelper = new AncRulesEngineHelper(context); this.ancRulesEngineHelper.setJsonObject(mJSONObject); - this.globalValues = globalValues; } @Override protected Facts initializeFacts(Facts facts) { - if (globalValues != null) { - for (Map.Entry entry : globalValues.entrySet()) { - facts.put(RuleConstant.PREFIX.GLOBAL + entry.getKey(), getValue(entry.getValue())); - } - - facts.asMap().putAll(globalValues); - } - - selectedRuleName = facts.get(RuleConstant.SELECTED_RULE); - + super.initializeFacts(facts); facts.put("helper", ancRulesEngineHelper); return facts; } - @Override - public boolean beforeEvaluate(Rule rule, Facts facts) { - return selectedRuleName != null && selectedRuleName.equals(rule.getName()); - } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineHelper.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineHelper.java index b39cd5b15..e0e0f9c1b 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineHelper.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/helper/AncRulesEngineHelper.java @@ -25,6 +25,7 @@ import org.smartregister.anc.library.rule.AlertRule; import org.smartregister.anc.library.rule.ContactRule; import org.smartregister.anc.library.util.ANCFormUtils; +import org.smartregister.anc.library.util.Utils; import java.io.BufferedReader; import java.io.IOException; @@ -253,4 +254,14 @@ public int compareDateWithDurationsAddedAgainstToday(String dateString, String d public int compareDateAgainstToday(String theDate) { return compareTwoDates(theDate, (new LocalDate()).toString(FormUtils.NATIIVE_FORM_DATE_FORMAT_PATTERN)); } + + public Boolean validateVisitDate(String entityId, String visitDate) { + // Valid if visitDate is null or an empty string + if (visitDate == null || visitDate.equals("")) return true; + // Validate visit date + return Utils.isVisitDateValid(entityId, visitDate); + } + + + } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/AdvancedSearchInteractor.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/AdvancedSearchInteractor.java index da8298ff2..5200feaa2 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/AdvancedSearchInteractor.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/AdvancedSearchInteractor.java @@ -33,12 +33,10 @@ public AdvancedSearchInteractor() { @Override public void search(final Map editMap, final AdvancedSearchContract.InteractorCallBack callBack, final String ancId) { - Runnable runnable = () -> { + appExecutors.networkIO().execute(() -> { final Response response = globalSearch(editMap); appExecutors.mainThread().execute(() -> callBack.onResultsFound(response, ancId)); - }; - - appExecutors.networkIO().execute(runnable); + }); } private Response globalSearch(Map map) { diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/CharacteristicsInteractor.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/CharacteristicsInteractor.java index 9ceef705e..c8c1ab5fb 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/CharacteristicsInteractor.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/CharacteristicsInteractor.java @@ -52,8 +52,10 @@ public void saveSiteCharacteristics(Map siteCharacteristicsSetti if (localSettings != null) { for (int i = 0; i < localSettings.length(); i++) { JSONObject localSetting = localSettings.getJSONObject(i); + String valueObject = siteCharacteristicsSettingsMap.get(localSetting.getString(ConstantsUtils.KeyUtils.KEY)); + valueObject = org.smartregister.anc.library.util.Utils.extractValuefromJSONObject(valueObject); localSetting.put(ConstantsUtils.KeyUtils.VALUE, - "1".equals(siteCharacteristicsSettingsMap.get(localSetting.getString(ConstantsUtils.KeyUtils.KEY)))); + "1".equals(valueObject)); } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/ContactInteractor.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/ContactInteractor.java index cce1ca6aa..dd9e1da58 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/ContactInteractor.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/ContactInteractor.java @@ -47,6 +47,8 @@ public class ContactInteractor extends BaseContactInteractor implements ContactContract.Interactor { private Utils utils = new Utils(); + private String edd = null; + public ContactInteractor() { this(new AppExecutors()); } @@ -88,7 +90,6 @@ public HashMap finalizeContactForm(final Map det addThePreviousContactSchedule(baseEntityId, details, integerList); getDetailsRepository().add(baseEntityId, ConstantsUtils.DetailsKeyUtils.CONTACT_SCHEDULE, jsonObject.toString(), Calendar.getInstance().getTimeInMillis()); - //convert String to LocalDate ; LocalDate localDate = new LocalDate(details.get(DBConstantsUtils.KeyUtils.EDD)); nextContactVisitDate = localDate.minusWeeks(ConstantsUtils.DELIVERY_DATE_WEEKS).plusWeeks(nextContactVisitWeeks).toString(); @@ -98,6 +99,7 @@ public HashMap finalizeContactForm(final Map det nextContactVisitDate = details.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE); } + if (referral == null) { List doneTasks = utils.getContactTasksRepositoryHelper().getClosedTasks(baseEntityId); utils.createTasksPartialContainer(baseEntityId, context, nextContact - 1, doneTasks); @@ -130,6 +132,7 @@ public HashMap finalizeContactForm(final Map det addTheContactDate(baseEntityId, details); updateWomanDetails(details, womanDetail); + edd = details.get(DBConstantsUtils.KeyUtils.EDD); if (referral != null && !TextUtils.isEmpty(details.get(DBConstantsUtils.KeyUtils.EDD))) { addReferralGa(baseEntityId, details); } @@ -140,6 +143,8 @@ public HashMap finalizeContactForm(final Map det JSONObject updateClientEventJson = new JSONObject(ANCJsonFormUtils.gson.toJson(eventPair.second)); AncLibrary.getInstance().getEcSyncHelper().addEvent(baseEntityId, updateClientEventJson); } + + } catch (Exception e) { Timber.e(e, "%s --> finalizeContactForm", this.getClass().getCanonicalName()); } @@ -235,10 +240,17 @@ private PreviousContact preLoadPreviousContact(String baseEntityId, Map previousContactList = getPreviousContactRepository().getPreviousContacts(baseEntityId, null); JSONObject stateObject = null; + String lastContactNo = null; if (previousContactList != null) { stateObject = new JSONObject(); for (PreviousContact previousContact : previousContactList) { + if(lastContactNo == null) + lastContactNo = previousContact.getContactNo(); + + if(!lastContactNo.equals(previousContact.getContactNo()) && !stateObject.has(GEST_AGE_OPENMRS) && !TextUtils.isEmpty(edd)) + stateObject.put(GEST_AGE_OPENMRS,String.valueOf(Utils.getGestationAgeFromEDDate(edd))); + if(previousContact.getKey().equals(CONTACT_DATE) && stateObject.has(CONTACT_DATE)) continue; if(stateObject.has(previousContact.getKey())) @@ -255,8 +267,13 @@ protected PreviousContactRepository getPreviousContactRepository() { } public int getGestationAge(Map details) { - return details.containsKey(DBConstantsUtils.KeyUtils.EDD) && details.get(DBConstantsUtils.KeyUtils.EDD) != null ? Utils - .getGestationAgeFromEDDate(details.get(DBConstantsUtils.KeyUtils.EDD)) : 4; + if (!details.containsKey(DBConstantsUtils.KeyUtils.EDD) || details.get(DBConstantsUtils.KeyUtils.EDD) == null) return 4; + String edd = details.get(DBConstantsUtils.KeyUtils.EDD); + String visitDate = details.get(DBConstantsUtils.KeyUtils.LAST_VISIT_DATE); + + if (visitDate == null) return Utils.getGestationAgeFromEDDate(edd); + int ga = Utils.getGAFromEDDateOnVisitDate(edd, visitDate); + return ga; } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/RegisterInteractor.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/RegisterInteractor.java index 921a40890..5d2f9dfaa 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/RegisterInteractor.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/interactor/RegisterInteractor.java @@ -1,300 +1,300 @@ -package org.smartregister.anc.library.interactor; - -import android.content.ContentValues; - -import androidx.annotation.VisibleForTesting; -import androidx.core.util.Pair; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.tuple.Triple; -import org.json.JSONException; -import org.json.JSONObject; -import org.smartregister.anc.library.AncLibrary; -import org.smartregister.anc.library.contract.RegisterContract; -import org.smartregister.anc.library.event.PatientRemovedEvent; -import org.smartregister.anc.library.helper.ECSyncHelper; -import org.smartregister.anc.library.repository.PatientRepository; -import org.smartregister.anc.library.sync.BaseAncClientProcessorForJava; -import org.smartregister.anc.library.util.ANCJsonFormUtils; -import org.smartregister.anc.library.util.AppExecutors; -import org.smartregister.anc.library.util.ConstantsUtils; -import org.smartregister.anc.library.util.DBConstantsUtils; -import org.smartregister.anc.library.util.Utils; -import org.smartregister.clientandeventmodel.Client; -import org.smartregister.clientandeventmodel.Event; -import org.smartregister.commonregistry.AllCommonsRepository; -import org.smartregister.domain.UniqueId; -import org.smartregister.job.PullUniqueIdsServiceJob; -import org.smartregister.repository.AllSharedPreferences; -import org.smartregister.repository.UniqueIdRepository; -import org.smartregister.sync.ClientProcessorForJava; - -import java.util.Collections; -import java.util.Date; - -import timber.log.Timber; - -/** - * Created by keyman 27/06/2018. - */ -public class RegisterInteractor implements RegisterContract.Interactor { - private AppExecutors appExecutors; - private UniqueIdRepository uniqueIdRepository; - private ECSyncHelper syncHelper; - private AllSharedPreferences allSharedPreferences; - private ClientProcessorForJava clientProcessorForJava; - private AllCommonsRepository allCommonsRepository; - - public RegisterInteractor() { - this(new AppExecutors()); - } - - @VisibleForTesting - RegisterInteractor(AppExecutors appExecutors) { - this.appExecutors = appExecutors; - } - - @Override - public void onDestroy(boolean isChangingConfiguration) { - //TODO set presenter or model to null - } - - @Override - public void getNextUniqueId(final Triple triple, - final RegisterContract.InteractorCallBack callBack) { - Runnable runnable = () -> { - UniqueId uniqueId = getUniqueIdRepository().getNextUniqueId(); - final String entityId = uniqueId != null ? uniqueId.getOpenmrsId() : ""; - appExecutors.mainThread().execute(() -> { - if (StringUtils.isBlank(entityId)) { - callBack.onNoUniqueId(); - PullUniqueIdsServiceJob.scheduleJobImmediately(PullUniqueIdsServiceJob.TAG); //Non were found...lets trigger this againz - } else { - callBack.onUniqueIdFetched(triple, entityId); - } - }); - }; - - appExecutors.diskIO().execute(runnable); - } - - @Override - public void saveRegistration(final Pair pair, final String jsonString, final boolean isEditMode, - final RegisterContract.InteractorCallBack callBack) { - Runnable runnable = () -> { - - saveRegistration(pair, jsonString, isEditMode); - - String baseEntityId = getBaseEntityId(pair); - - if (!isEditMode && ConstantsUtils.DueCheckStrategy.CHECK_FOR_FIRST_CONTACT.equals(Utils.getDueCheckStrategy())) { - createPartialPreviousEvent(pair, baseEntityId); - } - - PatientRepository.updateCohabitants(jsonString, baseEntityId); - appExecutors.mainThread().execute(() -> { - callBack.setBaseEntityRegister(baseEntityId); - callBack.onRegistrationSaved(isEditMode); - }); - }; - appExecutors.diskIO().execute(runnable); - } - - /*** - * creates partial previous visit events after creation of client - * @param pair {@link Pair} - * @param baseEntityId {@link String} - */ - private void createPartialPreviousEvent(Pair pair, String baseEntityId) { - appExecutors.diskIO().execute(() -> { - try { - if (pair.second != null && pair.second.getDetails() != null) { - String strPreviousVisitsMap = pair.second.getDetails().get(ConstantsUtils.JsonFormKeyUtils.PREVIOUS_VISITS_MAP); - if (StringUtils.isNotBlank(strPreviousVisitsMap)) { - Utils.createPreviousVisitFromGroup(strPreviousVisitsMap, baseEntityId); - } - } - } catch (JSONException e) { - Timber.e(e); - } - }); - } - - @Override - public void removeWomanFromANCRegister(final String closeFormJsonString, final String providerId) { - Runnable runnable = () -> { - try { - Triple triple = ANCJsonFormUtils - .saveRemovedFromANCRegister(getAllSharedPreferences(), closeFormJsonString, providerId); - - if (triple == null) { - return; - } - - boolean isDeath = triple.getLeft(); - Event event = triple.getMiddle(); - Event updateChildDetailsEvent = triple.getRight(); - - String baseEntityId = event.getBaseEntityId(); - - //Update client to deceased - JSONObject client = getSyncHelper().getClient(baseEntityId); - if (isDeath) { - client.put(ConstantsUtils.JsonFormKeyUtils.DEATH_DATE, Utils.getTodaysDate()); - client.put(ConstantsUtils.JsonFormKeyUtils.DEATH_DATE_APPROX, false); - } - JSONObject attributes = client.getJSONObject(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES); - attributes.put(DBConstantsUtils.KeyUtils.DATE_REMOVED, Utils.getTodaysDate()); - client.put(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES, attributes); - getSyncHelper().addClient(baseEntityId, client); - - //Add Remove Event for child to flag for Server delete - JSONObject eventJson = new JSONObject(ANCJsonFormUtils.gson.toJson(event)); - getSyncHelper().addEvent(event.getBaseEntityId(), eventJson); - - //Update Child Entity to include death date - JSONObject eventJsonUpdateChildEvent = - new JSONObject(ANCJsonFormUtils.gson.toJson(updateChildDetailsEvent)); - getSyncHelper().addEvent(baseEntityId, eventJsonUpdateChildEvent); //Add event to flag server update - - //Update REGISTER and FTS Tables - if (getAllCommonsRepository() != null) { - ContentValues values = new ContentValues(); - values.put(DBConstantsUtils.KeyUtils.DATE_REMOVED, Utils.getTodaysDate()); - getAllCommonsRepository().update(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME, values, baseEntityId); - getAllCommonsRepository().updateSearch(baseEntityId); - - } - } catch (Exception e) { - Timber.e(e, " --> removeWomanFromANCRegister"); - } finally { - Utils.postStickyEvent(new PatientRemovedEvent()); - } - }; - - appExecutors.diskIO().execute(runnable); - } - - public AllCommonsRepository getAllCommonsRepository() { - if (allCommonsRepository == null) { - allCommonsRepository = - AncLibrary.getInstance().getContext().allCommonsRepositoryobjects(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME); - } - return allCommonsRepository; - } - - public void setAllCommonsRepository(AllCommonsRepository allCommonsRepository) { - this.allCommonsRepository = allCommonsRepository; - } - - private void saveRegistration(Pair pair, String jsonString, boolean isEditMode) { - try { - Client baseClient = pair.first; - Event baseEvent = pair.second; - - if (baseClient != null) { - JSONObject clientJson = new JSONObject(ANCJsonFormUtils.gson.toJson(baseClient)); - if (isEditMode) { - ANCJsonFormUtils.mergeAndSaveClient(baseClient); - } else { - getSyncHelper().addClient(baseClient.getBaseEntityId(), clientJson); - } - } - - if (baseEvent != null) { - JSONObject eventJson = new JSONObject(ANCJsonFormUtils.gson.toJson(baseEvent)); - getSyncHelper().addEvent(baseEvent.getBaseEntityId(), eventJson); - } - - if (isEditMode) { - // Unassign current OPENSRP ID - if (baseClient != null) { - String newOpenSRPId = baseClient.getIdentifier(ConstantsUtils.ClientUtils.ANC_ID).replace("-", ""); - String currentOpenSRPId = - ANCJsonFormUtils.getString(jsonString, ConstantsUtils.CURRENT_OPENSRP_ID).replace("-", ""); - if (!newOpenSRPId.equals(currentOpenSRPId)) { - //OPENSRP ID was changed - // TODO: The new ID should be closed in the unique_ids repository - getUniqueIdRepository().open(currentOpenSRPId); - } - } - - } else { - if (baseClient != null) { - String opensrpId = baseClient.getIdentifier(ConstantsUtils.ClientUtils.ANC_ID); - - //mark OPENSRP ID as used - getUniqueIdRepository().close(opensrpId); - } - } - - if (baseClient != null || baseEvent != null) { - String imageLocation = ANCJsonFormUtils.getFieldValue(jsonString, ConstantsUtils.WOM_IMAGE); - ANCJsonFormUtils.saveImage(baseEvent.getProviderId(), baseClient.getBaseEntityId(), imageLocation); - } - - long lastSyncTimeStamp = getAllSharedPreferences().fetchLastUpdatedAtDate(0); - Date lastSyncDate = new Date(lastSyncTimeStamp); - getClientProcessorForJava().processClient(getSyncHelper().getEvents(Collections.singletonList(baseEvent.getFormSubmissionId()))); - getAllSharedPreferences().saveLastUpdatedAtDate(lastSyncDate.getTime()); - } catch (Exception e) { - Timber.e(e, " --> saveRegistration"); - } - } - - private String getBaseEntityId(Pair clientEventPair) { - String baseEntityId = ""; - if (clientEventPair != null) { - Client client = clientEventPair.first; - baseEntityId = client.getBaseEntityId(); - } - - return baseEntityId; - } - - public ECSyncHelper getSyncHelper() { - if (syncHelper == null) { - syncHelper = AncLibrary.getInstance().getEcSyncHelper(); - } - return syncHelper; - } - - public void setSyncHelper(ECSyncHelper syncHelper) { - this.syncHelper = syncHelper; - } - - public AllSharedPreferences getAllSharedPreferences() { - if (allSharedPreferences == null) { - allSharedPreferences = AncLibrary.getInstance().getContext().allSharedPreferences(); - } - return allSharedPreferences; - } - - public void setAllSharedPreferences(AllSharedPreferences allSharedPreferences) { - this.allSharedPreferences = allSharedPreferences; - } - - public ClientProcessorForJava getClientProcessorForJava() { - if (clientProcessorForJava == null) { - clientProcessorForJava = AncLibrary.getInstance().getClientProcessorForJava(); - } - return clientProcessorForJava; - } - - public void setClientProcessorForJava(BaseAncClientProcessorForJava clientProcessorForJava) { - this.clientProcessorForJava = clientProcessorForJava; - } - - public UniqueIdRepository getUniqueIdRepository() { - if (uniqueIdRepository == null) { - uniqueIdRepository = AncLibrary.getInstance().getUniqueIdRepository(); - } - return uniqueIdRepository; - } - - public void setUniqueIdRepository(UniqueIdRepository uniqueIdRepository) { - this.uniqueIdRepository = uniqueIdRepository; - } - - public enum TYPE {SAVED, UPDATED} +package org.smartregister.anc.library.interactor; + +import android.content.ContentValues; + +import androidx.annotation.VisibleForTesting; +import androidx.core.util.Pair; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Triple; +import org.json.JSONException; +import org.json.JSONObject; +import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.contract.RegisterContract; +import org.smartregister.anc.library.event.PatientRemovedEvent; +import org.smartregister.anc.library.helper.ECSyncHelper; +import org.smartregister.anc.library.repository.PatientRepository; +import org.smartregister.anc.library.sync.BaseAncClientProcessorForJava; +import org.smartregister.anc.library.util.ANCJsonFormUtils; +import org.smartregister.anc.library.util.AppExecutors; +import org.smartregister.anc.library.util.ConstantsUtils; +import org.smartregister.anc.library.util.DBConstantsUtils; +import org.smartregister.anc.library.util.Utils; +import org.smartregister.clientandeventmodel.Client; +import org.smartregister.clientandeventmodel.Event; +import org.smartregister.commonregistry.AllCommonsRepository; +import org.smartregister.domain.UniqueId; +import org.smartregister.job.PullUniqueIdsServiceJob; +import org.smartregister.repository.AllSharedPreferences; +import org.smartregister.repository.UniqueIdRepository; +import org.smartregister.sync.ClientProcessorForJava; + +import java.util.Collections; +import java.util.Date; + +import timber.log.Timber; + +/** + * Created by keyman 27/06/2018. + */ +public class RegisterInteractor implements RegisterContract.Interactor { + private AppExecutors appExecutors; + private UniqueIdRepository uniqueIdRepository; + private ECSyncHelper syncHelper; + private AllSharedPreferences allSharedPreferences; + private ClientProcessorForJava clientProcessorForJava; + private AllCommonsRepository allCommonsRepository; + + public RegisterInteractor() { + this(new AppExecutors()); + } + + @VisibleForTesting + RegisterInteractor(AppExecutors appExecutors) { + this.appExecutors = appExecutors; + } + + @Override + public void onDestroy(boolean isChangingConfiguration) { + //TODO set presenter or model to null + } + + @Override + public void getNextUniqueId(final Triple triple, + final RegisterContract.InteractorCallBack callBack) { + Runnable runnable = () -> { + UniqueId uniqueId = getUniqueIdRepository().getNextUniqueId(); + final String entityId = uniqueId != null ? uniqueId.getOpenmrsId() : ""; + appExecutors.mainThread().execute(() -> { + if (StringUtils.isBlank(entityId)) { + callBack.onNoUniqueId(); + PullUniqueIdsServiceJob.scheduleJobImmediately(PullUniqueIdsServiceJob.TAG); //Non were found...lets trigger this againz + } else { + callBack.onUniqueIdFetched(triple, entityId); + } + }); + }; + + appExecutors.diskIO().execute(runnable); + } + + @Override + public void saveRegistration(final Pair pair, final String jsonString, final boolean isEditMode, + final RegisterContract.InteractorCallBack callBack) { + Runnable runnable = () -> { + + saveRegistration(pair, jsonString, isEditMode); + + String baseEntityId = getBaseEntityId(pair); + + if (!isEditMode && ConstantsUtils.DueCheckStrategy.CHECK_FOR_FIRST_CONTACT.equals(Utils.getDueCheckStrategy())) { + createPartialPreviousEvent(pair, baseEntityId); + } + + PatientRepository.updateCohabitants(jsonString, baseEntityId); + appExecutors.mainThread().execute(() -> { + callBack.setBaseEntityRegister(baseEntityId); + callBack.onRegistrationSaved(isEditMode); + }); + }; + appExecutors.diskIO().execute(runnable); + } + + /*** + * creates partial previous visit events after creation of client + * @param pair {@link Pair} + * @param baseEntityId {@link String} + */ + private void createPartialPreviousEvent(Pair pair, String baseEntityId) { + appExecutors.diskIO().execute(() -> { + try { + if (pair.second != null && pair.second.getDetails() != null) { + String strPreviousVisitsMap = pair.second.getDetails().get(ConstantsUtils.JsonFormKeyUtils.PREVIOUS_VISITS_MAP); + if (StringUtils.isNotBlank(strPreviousVisitsMap)) { + Utils.createPreviousVisitFromGroup(strPreviousVisitsMap, baseEntityId); + } + } + } catch (JSONException e) { + Timber.e(e); + } + }); + } + + @Override + public void removeWomanFromANCRegister(final String closeFormJsonString, final String providerId) { + Runnable runnable = () -> { + try { + Triple triple = ANCJsonFormUtils + .saveRemovedFromANCRegister(getAllSharedPreferences(), closeFormJsonString, providerId); + + if (triple == null) { + return; + } + + boolean isDeath = triple.getLeft(); + Event event = triple.getMiddle(); + Event updateChildDetailsEvent = triple.getRight(); + + String baseEntityId = event.getBaseEntityId(); + + //Update client to deceased + JSONObject client = getSyncHelper().getClient(baseEntityId); + if (isDeath) { + client.put(ConstantsUtils.JsonFormKeyUtils.DEATH_DATE, Utils.getTodaysDate()); + client.put(ConstantsUtils.JsonFormKeyUtils.DEATH_DATE_APPROX, false); + } + JSONObject attributes = client.getJSONObject(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES); + attributes.put(DBConstantsUtils.KeyUtils.DATE_REMOVED, Utils.getTodaysDate()); + client.put(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES, attributes); + getSyncHelper().addClient(baseEntityId, client); + + //Add Remove Event for child to flag for Server delete + JSONObject eventJson = new JSONObject(ANCJsonFormUtils.gson.toJson(event)); + getSyncHelper().addEvent(event.getBaseEntityId(), eventJson); + + //Update Child Entity to include death date + JSONObject eventJsonUpdateChildEvent = + new JSONObject(ANCJsonFormUtils.gson.toJson(updateChildDetailsEvent)); + getSyncHelper().addEvent(baseEntityId, eventJsonUpdateChildEvent); //Add event to flag server update + + //Update REGISTER and FTS Tables + if (getAllCommonsRepository() != null) { + ContentValues values = new ContentValues(); + values.put(DBConstantsUtils.KeyUtils.DATE_REMOVED, Utils.getTodaysDate()); + getAllCommonsRepository().update(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME, values, baseEntityId); + getAllCommonsRepository().updateSearch(baseEntityId); + + } + } catch (Exception e) { + Timber.e(e, " --> removeWomanFromANCRegister"); + } finally { + Utils.postStickyEvent(new PatientRemovedEvent()); + } + }; + + appExecutors.diskIO().execute(runnable); + } + + public AllCommonsRepository getAllCommonsRepository() { + if (allCommonsRepository == null) { + allCommonsRepository = + AncLibrary.getInstance().getContext().allCommonsRepositoryobjects(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME); + } + return allCommonsRepository; + } + + public void setAllCommonsRepository(AllCommonsRepository allCommonsRepository) { + this.allCommonsRepository = allCommonsRepository; + } + + private void saveRegistration(Pair pair, String jsonString, boolean isEditMode) { + try { + Client baseClient = pair.first; + Event baseEvent = pair.second; + + if (baseClient != null) { + JSONObject clientJson = new JSONObject(ANCJsonFormUtils.gson.toJson(baseClient)); + if (isEditMode) { + ANCJsonFormUtils.mergeAndSaveClient(baseClient); + } else { + getSyncHelper().addClient(baseClient.getBaseEntityId(), clientJson); + } + } + + if (baseEvent != null) { + JSONObject eventJson = new JSONObject(ANCJsonFormUtils.gson.toJson(baseEvent)); + getSyncHelper().addEvent(baseEvent.getBaseEntityId(), eventJson); + } + + if (isEditMode) { + // Unassign current OPENSRP ID + if (baseClient != null) { + String newOpenSRPId = baseClient.getIdentifier(ConstantsUtils.ClientUtils.ANC_ID).replace("-", ""); + String currentOpenSRPId = + ANCJsonFormUtils.getString(jsonString, ConstantsUtils.CURRENT_OPENSRP_ID).replace("-", ""); + if (!newOpenSRPId.equals(currentOpenSRPId)) { + //OPENSRP ID was changed + // TODO: The new ID should be closed in the unique_ids repository + getUniqueIdRepository().open(currentOpenSRPId); + } + } + + } else { + if (baseClient != null) { + String opensrpId = baseClient.getIdentifier(ConstantsUtils.ClientUtils.ANC_ID); + + //mark OPENSRP ID as used + getUniqueIdRepository().close(opensrpId); + } + } + + if (baseClient != null || baseEvent != null) { + String imageLocation = ANCJsonFormUtils.getFieldValue(jsonString, ConstantsUtils.WOM_IMAGE); + ANCJsonFormUtils.saveImage(baseEvent.getProviderId(), baseClient.getBaseEntityId(), imageLocation); + } + + long lastSyncTimeStamp = getAllSharedPreferences().fetchLastUpdatedAtDate(0); + Date lastSyncDate = new Date(lastSyncTimeStamp); + getClientProcessorForJava().processClient(getSyncHelper().getEvents(Collections.singletonList(baseEvent.getFormSubmissionId()))); + getAllSharedPreferences().saveLastUpdatedAtDate(lastSyncDate.getTime()); + } catch (Exception e) { + Timber.e(e, " --> saveRegistration"); + } + } + + private String getBaseEntityId(Pair clientEventPair) { + String baseEntityId = ""; + if (clientEventPair != null) { + Client client = clientEventPair.first; + baseEntityId = client.getBaseEntityId(); + } + + return baseEntityId; + } + + public ECSyncHelper getSyncHelper() { + if (syncHelper == null) { + syncHelper = AncLibrary.getInstance().getEcSyncHelper(); + } + return syncHelper; + } + + public void setSyncHelper(ECSyncHelper syncHelper) { + this.syncHelper = syncHelper; + } + + public AllSharedPreferences getAllSharedPreferences() { + if (allSharedPreferences == null) { + allSharedPreferences = AncLibrary.getInstance().getContext().allSharedPreferences(); + } + return allSharedPreferences; + } + + public void setAllSharedPreferences(AllSharedPreferences allSharedPreferences) { + this.allSharedPreferences = allSharedPreferences; + } + + public ClientProcessorForJava getClientProcessorForJava() { + if (clientProcessorForJava == null) { + clientProcessorForJava = AncLibrary.getInstance().getClientProcessorForJava(); + } + return clientProcessorForJava; + } + + public void setClientProcessorForJava(BaseAncClientProcessorForJava clientProcessorForJava) { + this.clientProcessorForJava = clientProcessorForJava; + } + + public UniqueIdRepository getUniqueIdRepository() { + if (uniqueIdRepository == null) { + uniqueIdRepository = AncLibrary.getInstance().getUniqueIdRepository(); + } + return uniqueIdRepository; + } + + public void setUniqueIdRepository(UniqueIdRepository uniqueIdRepository) { + this.uniqueIdRepository = uniqueIdRepository; + } + + public enum TYPE {SAVED, UPDATED} } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/model/AdvancedSearchModel.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/model/AdvancedSearchModel.java index a4576b208..c18c9bc9e 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/model/AdvancedSearchModel.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/model/AdvancedSearchModel.java @@ -1,6 +1,9 @@ package org.smartregister.anc.library.model; +import android.content.Context; + import org.apache.commons.lang3.StringUtils; +import org.smartregister.anc.library.R; import org.smartregister.anc.library.contract.AdvancedSearchContract; import org.smartregister.anc.library.util.DBConstantsUtils; @@ -58,30 +61,31 @@ private void addMapValuesCheckingLocals(String field, boolean isLocal, Map ruleObjects = AncLibrary.getInstance().readYaml(FilePathUtils.FileUtils.ATTENTION_FLAGS); int redCount = 0; int yellowCount = 0; diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/model/RegisterFragmentModel.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/model/RegisterFragmentModel.java index 8153c1a8b..889d61f64 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/model/RegisterFragmentModel.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/model/RegisterFragmentModel.java @@ -2,6 +2,7 @@ import static org.smartregister.anc.library.util.ConstantsUtils.GLOBAL_IDENTIFIER; +import android.content.Context; import android.util.Log; import org.apache.commons.lang3.StringUtils; @@ -38,8 +39,8 @@ public class RegisterFragmentModel implements RegisterFragmentContract.Model { @Override - public RegisterConfiguration defaultRegisterConfiguration() { - return ConfigHelperUtils.defaultRegisterConfiguration(AncLibrary.getInstance().getApplicationContext()); + public RegisterConfiguration defaultRegisterConfiguration(Context context) { + return ConfigHelperUtils.defaultRegisterConfiguration(context); } @Override @@ -64,15 +65,25 @@ public String countSelect(String tableName, String mainCondition) { @Override public String mainSelect(String tableName, String mainCondition) { SmartRegisterQueryBuilder queryBuilder = new SmartRegisterQueryBuilder(); - String[] columns = new String[]{tableName + "." + DBConstantsUtils.KeyUtils.RELATIONAL_ID, tableName + "." + DBConstantsUtils.KeyUtils.LAST_INTERACTED_WITH, - tableName + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID, tableName + "." + DBConstantsUtils.KeyUtils.FIRST_NAME, - tableName + "." + DBConstantsUtils.KeyUtils.LAST_NAME, tableName + "." + DBConstantsUtils.KeyUtils.ANC_ID, - tableName + "." + DBConstantsUtils.KeyUtils.DOB, getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PHONE_NUMBER,getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER, - getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_NAME, tableName + "." + DBConstantsUtils.KeyUtils.DATE_REMOVED, - getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.EDD, getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, - getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.CONTACT_STATUS, - getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT, getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, - getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE}; + String[] columns = new String[]{ + tableName + "." + DBConstantsUtils.KeyUtils.RELATIONAL_ID, + tableName + "." + DBConstantsUtils.KeyUtils.LAST_INTERACTED_WITH, + tableName + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID, + tableName + "." + DBConstantsUtils.KeyUtils.DATE_REMOVED, + tableName + "." + DBConstantsUtils.KeyUtils.FIRST_NAME, + tableName + "." + DBConstantsUtils.KeyUtils.LAST_NAME, tableName + "." + DBConstantsUtils.KeyUtils.ANC_ID, + tableName + "." + DBConstantsUtils.KeyUtils.DOB, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PHONE_NUMBER, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_NAME, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.EDD, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.CONTACT_STATUS, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE + }; queryBuilder.selectInitiateMainTable(tableName, columns); queryBuilder.customJoin(" join " + getRegisterQueryProvider().getDetailsTable() + " on " + getRegisterQueryProvider().getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + "= " + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/AdvancedSearchPresenter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/AdvancedSearchPresenter.java index be4265a3e..4fa8f5bc4 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/AdvancedSearchPresenter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/AdvancedSearchPresenter.java @@ -1,5 +1,6 @@ package org.smartregister.anc.library.presenter; +import android.content.Context; import android.database.Cursor; import android.database.CursorJoiner; @@ -21,18 +22,20 @@ public class AdvancedSearchPresenter extends RegisterFragmentPresenter public static final String TABLE_NAME = DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME; private WeakReference viewReference; private AdvancedSearchContract.Model model; + private Context context; public AdvancedSearchPresenter(AdvancedSearchContract.View view, String viewConfigurationIdentifier) { super(view, viewConfigurationIdentifier); this.viewReference = new WeakReference<>(view); model = new AdvancedSearchModel(); interactor = new AdvancedSearchInteractor(); + context = view.getContext(); } public void search(String firstName, String lastName, String ancId, String edd, String dob, String phoneNumber, String alternateContact, boolean isLocal) { String searchCriteria = - model.createSearchString(firstName, lastName, ancId, edd, dob, phoneNumber, alternateContact); + model.createSearchString(this.context, firstName, lastName, ancId, edd, dob, phoneNumber, alternateContact); if (StringUtils.isBlank(searchCriteria)) { return; } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/PreviousContactDetailsPresenter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/PreviousContactDetailsPresenter.java index 30848e41e..b453b7ee4 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/PreviousContactDetailsPresenter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/PreviousContactDetailsPresenter.java @@ -67,6 +67,7 @@ public PreviousContactsDetails.View getProfileView() { @Override public void loadPreviousContactSchedule(String baseEntityId, String contactNo, String edd) { try { + Facts immediatePreviousSchedule = getPreviousContactRepository() .getImmediatePreviousSchedule(baseEntityId, contactNo); String contactScheduleString = ""; diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfileFragmentPresenter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfileFragmentPresenter.java index 2a5fb2c70..cbd601bf5 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfileFragmentPresenter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfileFragmentPresenter.java @@ -1,5 +1,6 @@ package org.smartregister.anc.library.presenter; +import android.annotation.SuppressLint; import android.text.TextUtils; import org.apache.commons.lang3.StringUtils; @@ -54,12 +55,12 @@ public ProfileFragmentContract.View getProfileView() { } } + @SuppressLint("NewApi") @Override public Facts getImmediatePreviousContact(Map clientDetails, String baseEntityId, String contactNo) { Facts facts = new Facts(); try { facts = AncLibrary.getInstance().getPreviousContactRepository().getPreviousContactFacts(baseEntityId, contactNo, true); - Map factsAsMap = facts.asMap(); String attentionFlags = ""; if (factsAsMap.containsKey(ConstantsUtils.DetailsKeyUtils.ATTENTION_FLAG_FACTS)) { diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfilePresenter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfilePresenter.java index 51d045624..9167c3e38 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfilePresenter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/ProfilePresenter.java @@ -2,11 +2,15 @@ import android.content.Context; import android.content.Intent; +import android.util.Log; +import android.view.View; import androidx.core.util.Pair; import org.apache.commons.lang3.tuple.Triple; +import org.jeasy.rules.api.Facts; import org.json.JSONObject; +import org.smartregister.anc.library.AncLibrary; import org.smartregister.anc.library.R; import org.smartregister.anc.library.contract.ProfileContract; import org.smartregister.anc.library.contract.RegisterContract; @@ -138,22 +142,38 @@ public void processFormDetailsSave(Intent data, AllSharedPreferences allSharedPr @Override public void refreshProfileTopSection(Map client) { if (client != null) { - getProfileView() - .setProfileName(client.get(DBConstantsUtils.KeyUtils.FIRST_NAME) + " " + client.get(DBConstantsUtils.KeyUtils.LAST_NAME)); - getProfileView().setProfileAge(String.valueOf(Utils.getAgeFromDate(client.get(DBConstantsUtils.KeyUtils.DOB)))); + ProfileContract.View profile = getProfileView(); try { - if(client.containsKey(DBConstantsUtils.KeyUtils.EDD) && client.get(DBConstantsUtils.KeyUtils.EDD) != null) - if(Utils.getGestationAgeFromEDDate(client.get(DBConstantsUtils.KeyUtils.EDD)) <= 40) { - getProfileView().setProfileGestationAge( - String.valueOf(Utils.getGestationAgeFromEDDate(client.get(DBConstantsUtils.KeyUtils.EDD)))); - } + // Retrieve client's data + String ancId = client.get(DBConstantsUtils.KeyUtils.ANC_ID); + String entityId = client.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID); + String name = client.get(DBConstantsUtils.KeyUtils.FIRST_NAME) + " " + client.get(DBConstantsUtils.KeyUtils.LAST_NAME); + String age = String.valueOf(Utils.getAgeFromDate(client.get(DBConstantsUtils.KeyUtils.DOB))); + String recordDate = client.get(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE); + String lastVisit = Utils.getClientLastVisitDate(entityId); + String phoneNumber = client.get(DBConstantsUtils.KeyUtils.PHONE_NUMBER); + String nextContact = client.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT); + Integer nextContactNo = nextContact != null ? new Integer(nextContact) : null; + Integer currentContactNo = (nextContactNo != null || nextContactNo >= 0) ? nextContactNo - 1 : null; + // Update text in UI + profile.setProfileImage(entityId); + profile.setProfileID(ancId); + profile.setProfileName(name); + profile.setProfileAge(age); + + // Load contact details when she has previous records + if (recordDate != null && currentContactNo != null) { + String edd = client.get(DBConstantsUtils.KeyUtils.EDD); + String actualEdd = Utils.getActualEDD(edd, recordDate, lastVisit); + String ga = String.valueOf(Utils.getLastContactGA(edd, lastVisit)); + profile.setProfileGestationAge(ga); + profile.setPhoneNumber(phoneNumber); + } + } catch (Exception e) { getProfileView().setProfileGestationAge("0"); } - getProfileView().setProfileID(client.get(DBConstantsUtils.KeyUtils.ANC_ID)); - getProfileView().setProfileImage(client.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID)); - getProfileView().setPhoneNumber(client.get(DBConstantsUtils.KeyUtils.PHONE_NUMBER)); } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterFragmentPresenter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterFragmentPresenter.java index c5891ed42..38ba778d1 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterFragmentPresenter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterFragmentPresenter.java @@ -1,5 +1,7 @@ package org.smartregister.anc.library.presenter; +import android.util.Log; + import org.apache.commons.lang3.StringUtils; import org.json.JSONArray; import org.smartregister.anc.library.AncLibrary; @@ -35,8 +37,7 @@ public RegisterFragmentPresenter(RegisterFragmentContract.View view, String view this.viewReference = new WeakReference<>(view); this.model = new RegisterFragmentModel(); this.viewConfigurationIdentifier = viewConfigurationIdentifier; - this.config = model.defaultRegisterConfiguration(); - + this.config = model.defaultRegisterConfiguration(view.getContext()); this.interactor = new AdvancedSearchInteractor(); } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterPresenter.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterPresenter.java index 9db43bffb..05f289e46 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterPresenter.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/presenter/RegisterPresenter.java @@ -1,190 +1,191 @@ -package org.smartregister.anc.library.presenter; - -import android.content.SharedPreferences; -import android.preference.PreferenceManager; - -import androidx.core.util.Pair; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.tuple.Triple; -import org.json.JSONObject; -import org.smartregister.anc.library.R; -import org.smartregister.anc.library.contract.RegisterContract; -import org.smartregister.anc.library.interactor.RegisterInteractor; -import org.smartregister.anc.library.model.RegisterModel; -import org.smartregister.anc.library.repository.PatientRepository; -import org.smartregister.anc.library.util.ConstantsUtils; -import org.smartregister.anc.library.util.Utils; -import org.smartregister.clientandeventmodel.Client; -import org.smartregister.clientandeventmodel.Event; -import org.smartregister.domain.FetchStatus; -import org.smartregister.repository.AllSharedPreferences; -import org.smartregister.view.LocationPickerView; - -import java.lang.ref.WeakReference; -import java.util.HashMap; -import java.util.List; - -import timber.log.Timber; - -/** - * Created by keyamn on 27/06/2018. - */ -public class RegisterPresenter implements RegisterContract.Presenter, RegisterContract.InteractorCallBack { - private WeakReference viewReference; - private RegisterContract.Interactor interactor; - private RegisterContract.Model model; - private String baseEntityId; - private boolean isProgressDialogVisible = false; - - public RegisterPresenter(RegisterContract.View view) { - viewReference = new WeakReference<>(view); - interactor = new RegisterInteractor(); - model = new RegisterModel(); - } - - public void setModel(RegisterContract.Model model) { - this.model = model; - } - - public void setInteractor(RegisterContract.Interactor interactor) { - this.interactor = interactor; - } - - @Override - public void registerViewConfigurations(List viewIdentifiers) { - model.registerViewConfigurations(viewIdentifiers); - } - - @Override - public void unregisterViewConfiguration(List viewIdentifiers) { - model.unregisterViewConfiguration(viewIdentifiers); - } - - @Override - public void onDestroy(boolean isChangingConfiguration) { - viewReference = null;//set to null on destroy - // Inform interactor - interactor.onDestroy(isChangingConfiguration); - // Activity destroyed set interactor to null - if (!isChangingConfiguration) { - interactor = null; - model = null; - } - } - - @Override - public void updateInitials() { - String initials = model.getInitials(); - if (initials != null) { - getView().updateInitialsText(initials); - } - } - - private RegisterContract.View getView() { - if (viewReference != null) return viewReference.get(); - else return null; - } - - @Override - public void saveLanguage(String language) { - model.saveLanguage(language); - getView().displayToast(language + " selected"); - } - - @Override - public void startForm(String formName, String entityId, String metadata, LocationPickerView locationPickerView) - throws Exception { - if (locationPickerView == null || StringUtils.isBlank(locationPickerView.getSelectedItem())) { - getView().displayToast(R.string.no_location_picker); - } else { - String currentLocationId = model.getLocationId(locationPickerView.getSelectedItem()); - startForm(formName, entityId, metadata, currentLocationId); - } - } - - @Override - public void startForm(String formName, String entityId, String metadata, String currentLocationId) throws Exception { - - if (StringUtils.isBlank(entityId)) { - Triple triple = Triple.of(formName, metadata, currentLocationId); - interactor.getNextUniqueId(triple, this); - return; - } - - JSONObject form = model.getFormAsJson(formName, entityId, currentLocationId); - getView().startFormActivity(form); - - } - - @Override - public void saveRegistrationForm(String jsonString, boolean isEditMode) { - try { - if(!isProgressDialogVisible) - getView().showProgressDialog(R.string.saving_dialog_title); - isProgressDialogVisible = true; - Pair pair = model.processRegistration(jsonString); - if (pair == null) { - return; - } - - interactor.saveRegistration(pair, jsonString, isEditMode, this); - } catch (Exception e) { - Timber.e(e, " --> saveRegistrationForm"); - } - } - - @Override - public void closeAncRecord(String jsonString) { - try { - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getView().getContext()); - AllSharedPreferences allSharedPreferences = new AllSharedPreferences(preferences); - - Timber.d(jsonString); - getView().showProgressDialog(jsonString.contains(ConstantsUtils.EventTypeUtils.CLOSE) ? R.string.removing_dialog_title : - R.string.saving_dialog_title); - - interactor.removeWomanFromANCRegister(jsonString, allSharedPreferences.fetchRegisteredANM()); - } catch (Exception e) { - Timber.e(e, " --> closeAncRecord"); - - } - } - - @Override - public void onUniqueIdFetched(Triple triple, String entityId) { - try { - startForm(triple.getLeft(), entityId, triple.getMiddle(), triple.getRight()); - } catch (Exception e) { - Timber.e(e, " --> onUniqueIdFetched"); - getView().displayToast(R.string.error_unable_to_start_form); - } - } - - @Override - public void onNoUniqueId() { - getView().displayShortToast(R.string.no_openmrs_id); - } - - @Override - public void setBaseEntityRegister(String baseEntityId) { - this.baseEntityId = baseEntityId; - } - - @Override - public void onRegistrationSaved(boolean isEdit) { - getView().refreshList(FetchStatus.fetched); - goToClientProfile(baseEntityId); - getView().hideProgressDialog(); - isProgressDialogVisible = false; - } - - private void goToClientProfile(String baseEntityId) { - if (StringUtils.isNotBlank(baseEntityId)) { - HashMap womanProfileDetails = (HashMap) PatientRepository.getWomanProfileDetails(baseEntityId); - if (womanProfileDetails != null) { - Utils.navigateToProfile(getView().getContext(), womanProfileDetails); - } - } - } -} +package org.smartregister.anc.library.presenter; + +import android.content.SharedPreferences; +import android.preference.PreferenceManager; + +import androidx.core.util.Pair; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Triple; +import org.json.JSONObject; +import org.smartregister.anc.library.R; +import org.smartregister.anc.library.contract.RegisterContract; +import org.smartregister.anc.library.interactor.RegisterInteractor; +import org.smartregister.anc.library.model.RegisterModel; +import org.smartregister.anc.library.repository.PatientRepository; +import org.smartregister.anc.library.util.ConstantsUtils; +import org.smartregister.anc.library.util.Utils; +import org.smartregister.clientandeventmodel.Client; +import org.smartregister.clientandeventmodel.Event; +import org.smartregister.domain.FetchStatus; +import org.smartregister.repository.AllSharedPreferences; +import org.smartregister.view.LocationPickerView; + +import java.lang.ref.WeakReference; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; + +import timber.log.Timber; + +/** + * Created by keyamn on 27/06/2018. + */ +public class RegisterPresenter implements RegisterContract.Presenter, RegisterContract.InteractorCallBack { + private WeakReference viewReference; + private RegisterContract.Interactor interactor; + private RegisterContract.Model model; + private String baseEntityId; + private boolean isProgressDialogVisible = false; + + public RegisterPresenter(RegisterContract.View view) { + viewReference = new WeakReference<>(view); + interactor = new RegisterInteractor(); + model = new RegisterModel(); + } + + public void setModel(RegisterContract.Model model) { + this.model = model; + } + + public void setInteractor(RegisterContract.Interactor interactor) { + this.interactor = interactor; + } + + @Override + public void registerViewConfigurations(List viewIdentifiers) { + model.registerViewConfigurations(viewIdentifiers); + } + + @Override + public void unregisterViewConfiguration(List viewIdentifiers) { + model.unregisterViewConfiguration(viewIdentifiers); + } + + @Override + public void onDestroy(boolean isChangingConfiguration) { + viewReference = null;//set to null on destroy + // Inform interactor + interactor.onDestroy(isChangingConfiguration); + // Activity destroyed set interactor to null + if (!isChangingConfiguration) { + interactor = null; + model = null; + } + } + + @Override + public void updateInitials() { + String initials = model.getInitials(); + if (initials != null) { + getView().updateInitialsText(initials); + } + } + + private RegisterContract.View getView() { + if (viewReference != null) return viewReference.get(); + else return null; + } + + @Override + public void saveLanguage(String language) { + model.saveLanguage(language); + getView().displayToast(language + " selected"); + } + + @Override + public void startForm(String formName, String entityId, String metadata, LocationPickerView locationPickerView) + throws Exception { + if (locationPickerView == null || StringUtils.isBlank(locationPickerView.getSelectedItem())) { + getView().displayToast(R.string.no_location_picker); + } else { + String currentLocationId = model.getLocationId(locationPickerView.getSelectedItem()); + startForm(formName, entityId, metadata, currentLocationId); + } + } + + @Override + public void startForm(String formName, String entityId, String metadata, String currentLocationId) throws Exception { + + if (StringUtils.isBlank(entityId)) { + Triple triple = Triple.of(formName, metadata, currentLocationId); + interactor.getNextUniqueId(triple, this); + return; + } + + JSONObject form = model.getFormAsJson(formName, entityId, currentLocationId); + getView().startFormActivity(form); + + } + + @Override + public void saveRegistrationForm(String jsonString, boolean isEditMode) { + try { + if(!isProgressDialogVisible) { + Objects.requireNonNull(getView()).showProgressDialog(R.string.saving_dialog_title); + isProgressDialogVisible = true; + } + + Pair pair = model.processRegistration(jsonString); + if (pair == null) { + return; + } + + interactor.saveRegistration(pair, jsonString, isEditMode, this); + } catch (Exception e) { + Timber.e(e, " --> saveRegistrationForm"); + } + } + + @Override + public void closeAncRecord(String jsonString) { + try { + SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getView().getContext()); + AllSharedPreferences allSharedPreferences = new AllSharedPreferences(preferences); + getView().showProgressDialog(jsonString.contains(ConstantsUtils.EventTypeUtils.CLOSE) ? R.string.removing_dialog_title : + R.string.saving_dialog_title); + + interactor.removeWomanFromANCRegister(jsonString, allSharedPreferences.fetchRegisteredANM()); + } catch (Exception e) { + Timber.e(e, " --> closeAncRecord"); + + } + } + + @Override + public void onUniqueIdFetched(Triple triple, String entityId) { + try { + startForm(triple.getLeft(), entityId, triple.getMiddle(), triple.getRight()); + } catch (Exception e) { + Timber.e(e, " --> onUniqueIdFetched"); + getView().displayToast(R.string.error_unable_to_start_form); + } + } + + @Override + public void onNoUniqueId() { + getView().displayShortToast(R.string.no_openmrs_id); + } + + @Override + public void setBaseEntityRegister(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + @Override + public void onRegistrationSaved(boolean isEdit) { + getView().refreshList(FetchStatus.fetched); + goToClientProfile(baseEntityId); + getView().hideProgressDialog(); + isProgressDialogVisible = false; + } + + private void goToClientProfile(String baseEntityId) { + if (StringUtils.isNotBlank(baseEntityId)) { + HashMap womanProfileDetails = (HashMap) PatientRepository.getWomanProfileDetails(baseEntityId); + if (womanProfileDetails != null) { + Utils.navigateToProfile(getView().getContext(), womanProfileDetails); + } + } + } +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/AdvancedSearchProvider.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/AdvancedSearchProvider.java index 20e4ca835..91ba1156e 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/AdvancedSearchProvider.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/AdvancedSearchProvider.java @@ -265,7 +265,7 @@ public AdvancedSearchViewHolder(View itemView) { age = itemView.findViewById(R.id.age); ga = itemView.findViewById(R.id.ga); ancId = itemView.findViewById(R.id.anc_id); - risk = itemView.findViewById(R.id.risk); + risk = itemView.findViewById(R.id.red_flag); profile = itemView.findViewById(R.id.profile); sync = itemView.findViewById(R.id.sync); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/RegisterProvider.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/RegisterProvider.java index 1312774b5..2c1591089 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/RegisterProvider.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/provider/RegisterProvider.java @@ -1,282 +1,296 @@ -package org.smartregister.anc.library.provider; - -import android.content.Context; -import android.database.Cursor; -import android.text.TextUtils; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.TextView; - -import androidx.recyclerview.widget.RecyclerView; - -import com.vijay.jsonwizard.views.CustomTextView; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.text.WordUtils; -import org.smartregister.anc.library.R; -import org.smartregister.anc.library.domain.ButtonAlertStatus; -import org.smartregister.anc.library.fragment.HomeRegisterFragment; -import org.smartregister.anc.library.util.DBConstantsUtils; -import org.smartregister.anc.library.util.Utils; -import org.smartregister.commonregistry.CommonPersonObject; -import org.smartregister.commonregistry.CommonPersonObjectClient; -import org.smartregister.commonregistry.CommonRepository; -import org.smartregister.cursoradapter.RecyclerViewProvider; -import org.smartregister.view.contract.SmartRegisterClient; -import org.smartregister.view.contract.SmartRegisterClients; -import org.smartregister.view.dialog.FilterOption; -import org.smartregister.view.dialog.ServiceModeOption; -import org.smartregister.view.dialog.SortOption; -import org.smartregister.view.viewholder.OnClickFormLauncher; - -import java.text.MessageFormat; -import java.util.Set; - -/** - * Created by keyman on 26/06/2018. - */ - -public class RegisterProvider implements RecyclerViewProvider { - private final LayoutInflater inflater; - private Set visibleColumns; - - private View.OnClickListener onClickListener; - private View.OnClickListener paginationClickListener; - - private Context context; - private CommonRepository commonRepository; - - public RegisterProvider(Context context, CommonRepository commonRepository, Set visibleColumns, - View.OnClickListener onClickListener, View.OnClickListener paginationClickListener) { - - inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - this.visibleColumns = visibleColumns; - - this.onClickListener = onClickListener; - this.paginationClickListener = paginationClickListener; - - this.context = context; - this.commonRepository = commonRepository; - } - - @Override - public void getView(Cursor cursor, SmartRegisterClient client, RegisterViewHolder viewHolder) { - CommonPersonObjectClient pc = (CommonPersonObjectClient) client; - if (visibleColumns.isEmpty()) { - populatePatientColumn(pc, client, viewHolder); - populateIdentifierColumn(pc, viewHolder); - populateLastColumn(pc, viewHolder); - } - } - - @Override - public void getFooterView(RecyclerView.ViewHolder viewHolder, int currentPageCount, int totalPageCount, boolean hasNext, - boolean hasPrevious) { - FooterViewHolder footerViewHolder = (FooterViewHolder) viewHolder; - footerViewHolder.pageInfoView - .setText(MessageFormat.format(context.getString(R.string.str_page_info), currentPageCount, totalPageCount)); - - footerViewHolder.nextPageView.setVisibility(hasNext ? View.VISIBLE : View.INVISIBLE); - footerViewHolder.previousPageView.setVisibility(hasPrevious ? View.VISIBLE : View.INVISIBLE); - - footerViewHolder.nextPageView.setOnClickListener(paginationClickListener); - footerViewHolder.previousPageView.setOnClickListener(paginationClickListener); - } - - @Override - public SmartRegisterClients updateClients(FilterOption villageFilter, ServiceModeOption serviceModeOption, - FilterOption searchFilter, SortOption sortOption) { - return null; - } - - @Override - public void onServiceModeSelected(ServiceModeOption serviceModeOption) {//Implement Abstract Method - } - - @Override - public OnClickFormLauncher newFormLauncher(String formName, String entityId, String metaData) { - return null; - } - - @Override - public LayoutInflater inflater() { - return inflater; - } - - @Override - public RegisterViewHolder createViewHolder(ViewGroup parent) { - View view = inflater.inflate(R.layout.register_home_list_row, parent, false); - return new RegisterViewHolder(view); - } - - @Override - public RecyclerView.ViewHolder createFooterHolder(ViewGroup parent) { - View view = inflater.inflate(R.layout.smart_register_pagination, parent, false); - return new FooterViewHolder(view); - } - - @Override - public boolean isFooterViewHolder(RecyclerView.ViewHolder viewHolder) { - return viewHolder instanceof FooterViewHolder; - } - - private void populatePatientColumn(CommonPersonObjectClient pc, SmartRegisterClient client, - RegisterViewHolder viewHolder) { - - String firstName = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.FIRST_NAME, true); - String lastName = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.LAST_NAME, true); - String patientName = Utils.getName(firstName, lastName); - - fillValue(viewHolder.patientName, WordUtils.capitalize(patientName)); - - String dobString = Utils.getDuration(Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.DOB, false)); - dobString = dobString.contains("y") ? dobString.substring(0, dobString.indexOf("y")) : dobString; - fillValue((viewHolder.age), String.format(context.getString(R.string.age_text), dobString)); - - - String edd = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.EDD, false); - - if (StringUtils.isNotBlank(edd)) { - if(Utils.getGestationAgeFromEDDate(edd) > 40) - { - fillValue(viewHolder.ga, ""); - } - else { - fillValue((viewHolder.ga), - String.format(context.getString(R.string.ga_text), Utils.getGestationAgeFromEDDate(edd))); - viewHolder.period.setVisibility(View.VISIBLE); - } - } else { - - fillValue((viewHolder.ga), ""); - } - - View patient = viewHolder.patientColumn; - attachPatientOnclickListener(patient, client); - - - View dueButton = viewHolder.dueButton; - attachAlertButtonOnclickListener(dueButton, client); - - - String redFlagCountRaw = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, false); - String yellowFlagCountRaw = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, false); - - int redFlagCount = !TextUtils.isEmpty(redFlagCountRaw) ? Integer.valueOf(redFlagCountRaw) : 0; - int yellowFlagCount = !TextUtils.isEmpty(yellowFlagCountRaw) ? Integer.valueOf(yellowFlagCountRaw) : 0; - int totalFlagCount = yellowFlagCount + redFlagCount; - - TextView riskLayout = viewHolder.risk; - - if (totalFlagCount > 0) { - riskLayout.setCompoundDrawablesWithIntrinsicBounds( - redFlagCount > 0 ? R.drawable.ic_red_flag : R.drawable.ic_yellow_flag, 0, 0, 0); - riskLayout.setText(String.valueOf(totalFlagCount)); - riskLayout.setVisibility(View.VISIBLE); - - attachRiskLayoutOnclickListener(riskLayout, client); - } else { - riskLayout.setVisibility(View.GONE); - } - } - - private void populateIdentifierColumn(CommonPersonObjectClient pc, RegisterViewHolder viewHolder) { - String ancId = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.ANC_ID, false); - fillValue(viewHolder.ancId, String.format(context.getString(R.string.anc_id_text), ancId)); - } - - private void populateLastColumn(CommonPersonObjectClient pc, RegisterViewHolder viewHolder) { - if (commonRepository != null) { - CommonPersonObject commonPersonObject = commonRepository.findByBaseEntityId(pc.entityId()); - if (commonPersonObject != null) { - viewHolder.sync.setVisibility(View.GONE); - ButtonAlertStatus buttonAlertStatus = - Utils.getButtonAlertStatus(pc.getColumnmaps(), context, false); - Utils.processButtonAlertStatus(context, viewHolder.dueButton, viewHolder.contactDoneTodayButton, - buttonAlertStatus); - - } else { - viewHolder.dueButton.setVisibility(View.GONE); - viewHolder.sync.setVisibility(View.VISIBLE); - - attachSyncOnclickListener(viewHolder.sync, pc); - } - } - } - - public static void fillValue(TextView v, String value) { - if (v != null) v.setText(value); - - } - - private void attachPatientOnclickListener(View view, SmartRegisterClient client) { - view.setOnClickListener(onClickListener); - view.setTag(client); - view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_NORMAL); - } - - private void attachAlertButtonOnclickListener(View view, SmartRegisterClient client) { - view.setOnClickListener(onClickListener); - view.setTag(client); - view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_ALERT_STATUS); - } - - private void attachRiskLayoutOnclickListener(View view, SmartRegisterClient client) { - view.setOnClickListener(onClickListener); - view.setTag(client); - view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_ATTENTION_FLAG); - } - - private void attachSyncOnclickListener(View view, SmartRegisterClient client) { - view.setOnClickListener(onClickListener); - view.setTag(client); - view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_SYNC); - } - - //////////////////////////////////////////////////////////////// - // Inner classes - //////////////////////////////////////////////////////////////// - - public class RegisterViewHolder extends RecyclerView.ViewHolder { - private TextView patientName; - private TextView age; - private TextView period; - private TextView ga; - private TextView ancId; - private TextView risk; - private Button dueButton; - private Button sync; - private View patientColumn; - private CustomTextView contactDoneTodayButton; - - public RegisterViewHolder(View itemView) { - super(itemView); - patientName = itemView.findViewById(R.id.patient_name); - age = itemView.findViewById(R.id.age); - ga = itemView.findViewById(R.id.ga); - period = itemView.findViewById(R.id.period); - ancId = itemView.findViewById(R.id.anc_id); - risk = itemView.findViewById(R.id.risk); - dueButton = itemView.findViewById(R.id.due_button); - sync = itemView.findViewById(R.id.sync); - patientColumn = itemView.findViewById(R.id.patient_column); - contactDoneTodayButton = itemView.findViewById(R.id.contact_today_text); - } - } - - public class FooterViewHolder extends RecyclerView.ViewHolder { - private TextView pageInfoView; - private Button nextPageView; - private Button previousPageView; - - public FooterViewHolder(View view) { - super(view); - - nextPageView = view.findViewById(org.smartregister.R.id.btn_next_page); - previousPageView = view.findViewById(org.smartregister.R.id.btn_previous_page); - pageInfoView = view.findViewById(org.smartregister.R.id.txt_page_info); - } - } -} +package org.smartregister.anc.library.provider; + +import android.content.Context; +import android.database.Cursor; +import android.text.TextUtils; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.TextView; + +import androidx.recyclerview.widget.RecyclerView; + +import com.vijay.jsonwizard.views.CustomTextView; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.WordUtils; +import org.smartregister.anc.library.R; +import org.smartregister.anc.library.domain.ButtonAlertStatus; +import org.smartregister.anc.library.fragment.HomeRegisterFragment; +import org.smartregister.anc.library.util.DBConstantsUtils; +import org.smartregister.anc.library.util.Utils; +import org.smartregister.commonregistry.CommonPersonObject; +import org.smartregister.commonregistry.CommonPersonObjectClient; +import org.smartregister.commonregistry.CommonRepository; +import org.smartregister.cursoradapter.RecyclerViewProvider; +import org.smartregister.view.contract.SmartRegisterClient; +import org.smartregister.view.contract.SmartRegisterClients; +import org.smartregister.view.dialog.FilterOption; +import org.smartregister.view.dialog.ServiceModeOption; +import org.smartregister.view.dialog.SortOption; +import org.smartregister.view.viewholder.OnClickFormLauncher; + +import java.text.MessageFormat; +import java.util.Set; + +/** + * Created by keyman on 26/06/2018. + */ + +public class RegisterProvider implements RecyclerViewProvider { + private final LayoutInflater inflater; + private Set visibleColumns; + + private View.OnClickListener onClickListener; + private View.OnClickListener paginationClickListener; + + private Context context; + private CommonRepository commonRepository; + + public RegisterProvider(Context context, CommonRepository commonRepository, Set visibleColumns, + View.OnClickListener onClickListener, View.OnClickListener paginationClickListener) { + + inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + this.visibleColumns = visibleColumns; + + this.onClickListener = onClickListener; + this.paginationClickListener = paginationClickListener; + + this.context = context; + this.commonRepository = commonRepository; + } + + @Override + public void getView(Cursor cursor, SmartRegisterClient client, RegisterViewHolder viewHolder) { + CommonPersonObjectClient pc = (CommonPersonObjectClient) client; + if (visibleColumns.isEmpty()) { + populatePatientColumn(pc, client, viewHolder); + populateIdentifierColumn(pc, viewHolder); + populateLastColumn(pc, viewHolder); + } + } + + @Override + public void getFooterView(RecyclerView.ViewHolder viewHolder, int currentPageCount, int totalPageCount, boolean hasNext, + boolean hasPrevious) { + FooterViewHolder footerViewHolder = (FooterViewHolder) viewHolder; + footerViewHolder.pageInfoView + .setText(MessageFormat.format(context.getString(R.string.str_page_info), currentPageCount, totalPageCount)); + + footerViewHolder.nextPageView.setVisibility(hasNext ? View.VISIBLE : View.INVISIBLE); + footerViewHolder.previousPageView.setVisibility(hasPrevious ? View.VISIBLE : View.INVISIBLE); + + footerViewHolder.nextPageView.setOnClickListener(paginationClickListener); + footerViewHolder.previousPageView.setOnClickListener(paginationClickListener); + } + + @Override + public SmartRegisterClients updateClients(FilterOption villageFilter, ServiceModeOption serviceModeOption, + FilterOption searchFilter, SortOption sortOption) { + return null; + } + + @Override + public void onServiceModeSelected(ServiceModeOption serviceModeOption) {//Implement Abstract Method + } + + @Override + public OnClickFormLauncher newFormLauncher(String formName, String entityId, String metaData) { + return null; + } + + @Override + public LayoutInflater inflater() { + return inflater; + } + + @Override + public RegisterViewHolder createViewHolder(ViewGroup parent) { + View view = inflater.inflate(R.layout.register_home_list_row, parent, false); + return new RegisterViewHolder(view); + } + + @Override + public RecyclerView.ViewHolder createFooterHolder(ViewGroup parent) { + View view = inflater.inflate(R.layout.smart_register_pagination, parent, false); + return new FooterViewHolder(view); + } + + @Override + public boolean isFooterViewHolder(RecyclerView.ViewHolder viewHolder) { + return viewHolder instanceof FooterViewHolder; + } + + private void populatePatientColumn(CommonPersonObjectClient pc, SmartRegisterClient client, + RegisterViewHolder viewHolder) { + + // - Encounter Date + String visitDate = Utils.getClientLastVisitDate(client.entityId()); + + // - Patient Column + View patientColumnView = viewHolder.patientColumn; + attachPatientOnclickListener(patientColumnView, client); + + // - Patient Name + String firstName = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.FIRST_NAME, true); + String lastName = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.LAST_NAME, true); + String patientName = Utils.getName(firstName, lastName); + fillValue(viewHolder.patientName, WordUtils.capitalize(patientName)); + + // - Date of Birth + String dobString = Utils.getDuration(Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.DOB, false)); + dobString = dobString.contains("y") ? dobString.substring(0, dobString.indexOf("y")) : dobString; + fillValue((viewHolder.age), String.format(context.getString(R.string.age_text), dobString)); + + // - Gestational Age + String edd = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.EDD, false); + Integer ga = 0; + if (visitDate != null) { + String recordDate = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, false); + String actualEdd = Utils.getActualEDD(edd, recordDate, visitDate); + ga = Utils.getLastContactGA(edd, visitDate); + if (actualEdd != null) edd = actualEdd; + } + int gaValue = StringUtils.isNotBlank(edd) && ga != 0 ? ga : 0; + String gaText = gaValue > 0 ? String.format(context.getString(R.string.ga_weeks), String.valueOf(gaValue)) : "-"; + + TextView gaView = viewHolder.ga; + TextView gaWarningView = viewHolder.gaWarning; + + fillValue(gaView, gaText); + if (gaValue < 42) { + gaWarningView.setVisibility(View.GONE); + } + + // Attention Flag + + String redFlagCountRaw = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, false); + String yellowFlagCountRaw = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, false); + + int redFlagCount = !TextUtils.isEmpty(redFlagCountRaw) ? Integer.valueOf(redFlagCountRaw) : 0; + int yellowFlagCount = !TextUtils.isEmpty(yellowFlagCountRaw) ? Integer.valueOf(yellowFlagCountRaw) : 0; + + TextView redFlagView = viewHolder.redFlag; + TextView yellowFlagView = viewHolder.yellowFlag; + + if (redFlagCount > 0) { + redFlagView.setText(String.valueOf(redFlagCount)); + attachRiskLayoutOnclickListener(redFlagView, client); + } else { + redFlagView.setVisibility(View.GONE); + } + + if (yellowFlagCount > 0) { + yellowFlagView.setText(String.valueOf(yellowFlagCount)); + attachRiskLayoutOnclickListener(yellowFlagView, client); + } else { + yellowFlagView.setVisibility(View.GONE); + } + + View dueButton = viewHolder.dueButton; + attachAlertButtonOnclickListener(dueButton, client); + + } + + private void populateIdentifierColumn(CommonPersonObjectClient pc, RegisterViewHolder viewHolder) { + // String ancId = Utils.getValue(pc.getColumnmaps(), DBConstantsUtils.KeyUtils.ANC_ID, false); + // fillValue(viewHolder.ancId, String.format(context.getString(R.string.anc_id_text), ancId)); + } + + private void populateLastColumn(CommonPersonObjectClient pc, RegisterViewHolder viewHolder) { + + if (commonRepository != null) { + CommonPersonObject commonPersonObject = commonRepository.findByBaseEntityId(pc.entityId()); + if (commonPersonObject != null) { + ButtonAlertStatus buttonAlertStatus = Utils.getButtonAlertStatus(pc.getColumnmaps(), context, false); + Utils.processButtonAlertStatus(context, viewHolder.dueButton, viewHolder.contactDoneTodayButton, buttonAlertStatus); + } else { + // viewHolder.dueButton.setVisibility(View.GONE); + // viewHolder.sync.setVisibility(View.VISIBLE); + // attachSyncOnclickListener(viewHolder.sync, pc); + } + } + + } + + public static void fillValue(TextView v, String value) { + if (v != null) v.setText(value); + + } + + private void attachPatientOnclickListener(View view, SmartRegisterClient client) { + view.setOnClickListener(onClickListener); + view.setTag(client); + view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_NORMAL); + } + + private void attachAlertButtonOnclickListener(View view, SmartRegisterClient client) { + view.setOnClickListener(onClickListener); + view.setTag(client); + view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_ALERT_STATUS); + } + + private void attachRiskLayoutOnclickListener(View view, SmartRegisterClient client) { + view.setOnClickListener(onClickListener); + view.setTag(client); + view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_ATTENTION_FLAG); + } + + private void attachSyncOnclickListener(View view, SmartRegisterClient client) { + view.setOnClickListener(onClickListener); + view.setTag(client); + view.setTag(R.id.VIEW_ID, HomeRegisterFragment.CLICK_VIEW_SYNC); + } + + //////////////////////////////////////////////////////////////// + // Inner classes + //////////////////////////////////////////////////////////////// + + public class RegisterViewHolder extends RecyclerView.ViewHolder { + private TextView patientName; + private TextView age; + private TextView period; + private TextView ga; + private TextView gaWarning; + private TextView ancId; + private TextView redFlag; + private TextView yellowFlag; + private Button dueButton; + private Button sync; + private View patientColumn; + private CustomTextView contactDoneTodayButton; + + public RegisterViewHolder(View itemView) { + super(itemView); + patientColumn = itemView.findViewById(R.id.patient_column); + patientName = itemView.findViewById(R.id.patient_name); + age = itemView.findViewById(R.id.age); + ga = itemView.findViewById(R.id.ga); + gaWarning = itemView.findViewById(R.id.ga_warning); + redFlag = itemView.findViewById(R.id.red_flag); + yellowFlag = itemView.findViewById(R.id.yellow_flag); + dueButton = itemView.findViewById(R.id.due_button); + + // period = itemView.findViewById(R.id.period); + // ancId = itemView.findViewById(R.id.anc_id); + // risk = itemView.findViewById(R.id.risk); + // sync = itemView.findViewById(R.id.sync); + // contactDoneTodayButton = itemView.findViewById(R.id.contact_today_text); + } + } + + public class FooterViewHolder extends RecyclerView.ViewHolder { + private TextView pageInfoView; + private Button nextPageView; + private Button previousPageView; + + public FooterViewHolder(View view) { + super(view); + + nextPageView = view.findViewById(org.smartregister.R.id.btn_next_page); + previousPageView = view.findViewById(org.smartregister.R.id.btn_previous_page); + pageInfoView = view.findViewById(org.smartregister.R.id.txt_page_info); + } + } +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PatientRepository.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PatientRepository.java index 8511c7bb6..a59eb2f20 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PatientRepository.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PatientRepository.java @@ -1,197 +1,208 @@ -package org.smartregister.anc.library.repository; - -import android.content.ContentValues; - -import androidx.annotation.NonNull; - -import net.sqlcipher.Cursor; -import net.sqlcipher.database.SQLiteDatabase; - -import org.apache.commons.lang3.StringUtils; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.smartregister.anc.library.AncLibrary; -import org.smartregister.anc.library.domain.WomanDetail; -import org.smartregister.anc.library.util.ANCJsonFormUtils; -import org.smartregister.anc.library.util.ConstantsUtils; -import org.smartregister.anc.library.util.DBConstantsUtils; -import org.smartregister.anc.library.util.Utils; -import org.smartregister.repository.BaseRepository; -import org.smartregister.repository.Repository; -import org.smartregister.view.activity.DrishtiApplication; - -import java.util.Calendar; -import java.util.HashMap; -import java.util.Map; - -import timber.log.Timber; - -/** - * Created by ndegwamartin on 14/07/2018. - */ -public class PatientRepository extends BaseRepository { - - private static final String[] projection = getRegisterQueryProvider().mainColumns(); - - /** - * Provides all woman details needed for display and/or editing - * - * @param baseEntityId - * @return {@link Map} - */ - public static Map getWomanProfileDetails(String baseEntityId) { - Cursor cursor = null; - - Map detailsMap = null; - try { - SQLiteDatabase db = getMasterRepository().getReadableDatabase(); - - String query = - "SELECT " + StringUtils.join(projection, ",") + " FROM " + getRegisterQueryProvider().getDemographicTable() + " join " + getRegisterQueryProvider().getDetailsTable() + - " on " + getRegisterQueryProvider().getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = " + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " WHERE " + - getRegisterQueryProvider().getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = ?"; - cursor = db.rawQuery(query, new String[]{baseEntityId}); - if (cursor != null && cursor.moveToFirst()) { - detailsMap = new HashMap<>(); - for (int count = 0; count < projection.length; count++) { - String columnName = cursor.getColumnName(count); - if (columnName != null) { - String columnValue = cursor.getString(cursor.getColumnIndex(columnName)); - if (columnName.equals(DBConstantsUtils.KeyUtils.LAST_NAME) && StringUtils.isBlank(columnValue)) - columnValue = ""; - detailsMap.put(columnName, columnValue); - } - } - } - return detailsMap; - } catch (Exception e) { - Timber.e(e, "%s ==> getWomanProfileDetails()", PatientRepository.class.getCanonicalName()); - } finally { - if (cursor != null) { - cursor.close(); - } - } - return null; - } - - public static boolean isFirstVisit(@NonNull String baseEntityId) { - SQLiteDatabase sqLiteDatabase = getMasterRepository().getReadableDatabase(); - Cursor cursor = sqLiteDatabase.query(getRegisterQueryProvider().getDetailsTable(), - new String[]{DBConstantsUtils.KeyUtils.EDD}, - DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = ? ", - new String[]{baseEntityId}, null, null, null, "1"); - String isFirstVisit = null; - if (cursor != null && cursor.moveToFirst()) { - isFirstVisit = cursor.getString(cursor.getColumnIndex(DBConstantsUtils.KeyUtils.EDD)); - cursor.close(); - } - - return StringUtils.isBlank(isFirstVisit); - } - - protected static Repository getMasterRepository() { - return DrishtiApplication.getInstance().getRepository(); - } - - private static RegisterQueryProvider getRegisterQueryProvider() { - return AncLibrary.getInstance().getRegisterQueryProvider(); - } - - public static void updateWomanAlertStatus(String baseEntityId, String alertStatus) { - ContentValues contentValues = new ContentValues(); - contentValues.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, alertStatus); - - updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); - - updateLastInteractedWith(baseEntityId); - } - - public static void updatePatient(String baseEntityId, ContentValues contentValues, String table) { - getMasterRepository().getWritableDatabase() - .update(table, contentValues, DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = ?", - new String[]{baseEntityId}); - } - - private static void updateLastInteractedWith(String baseEntityId) { - ContentValues lastInteractedWithContentValue = new ContentValues(); - - lastInteractedWithContentValue.put(DBConstantsUtils.KeyUtils.LAST_INTERACTED_WITH, Calendar.getInstance().getTimeInMillis()); - - updatePatient(baseEntityId, lastInteractedWithContentValue, getRegisterQueryProvider().getDemographicTable()); - } - - public static void updateContactVisitDetails(WomanDetail patientDetail, boolean isFinalize) { - ContentValues contentValues = new ContentValues(); - contentValues.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT, patientDetail.getNextContact()); - contentValues.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, patientDetail.getNextContactDate()); - contentValues.put(DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, patientDetail.getYellowFlagCount()); - contentValues.put(DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, patientDetail.getRedFlagCount()); - contentValues.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, patientDetail.getContactStatus()); - if (isFinalize) { - if (!patientDetail.isReferral()) { - contentValues - .put(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, Utils.DB_DF.format(Calendar.getInstance().getTime())); - contentValues.put(DBConstantsUtils.KeyUtils.PREVIOUS_CONTACT_STATUS, patientDetail.getContactStatus()); - } else { - contentValues.put(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, patientDetail.getLastContactRecordDate()); - contentValues.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, patientDetail.getPreviousContactStatus()); - } - } - - updatePatient(patientDetail.getBaseEntityId(), contentValues, getRegisterQueryProvider().getDetailsTable()); - - updateLastInteractedWith(patientDetail.getBaseEntityId()); - } - - /** - * This is a bad hack. Needs to be changed later - * - * @param form - * @param baseEntityId - */ - public static void updateCohabitants(String form, String baseEntityId) { - try { - JSONObject jsonObject = new JSONObject(form); - JSONArray fields = ANCJsonFormUtils.getSingleStepFormfields(jsonObject); - JSONObject cohabitants = ANCJsonFormUtils.getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.COHABITANTS); - JSONObject reminder = ANCJsonFormUtils.getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.REMINDERS); - - String value = cohabitants.optString(ConstantsUtils.KeyUtils.VALUE, "[]"); - String remindersValue = reminder.optString(ConstantsUtils.KeyUtils.VALUE,"{}"); - - ContentValues contentValues = new ContentValues(); - contentValues.put(DBConstantsUtils.KeyUtils.COHABITANTS, value); - contentValues.put(DBConstantsUtils.KeyUtils.REMINDERS,remindersValue); - - updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); - - updateLastInteractedWith(baseEntityId); - } catch (JSONException e) { - Timber.e(e); - } - } - - public static void updateEDDDate(String baseEntityId, String edd) { - - ContentValues contentValues = new ContentValues(); - if (edd != null) { - contentValues.put(DBConstantsUtils.KeyUtils.EDD, edd); - } else { - contentValues.putNull(DBConstantsUtils.KeyUtils.EDD); - } - updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); - } - - public static void updateContactVisitStartDate(String baseEntityId, String contactVisitStartDate) { - - ContentValues contentValues = new ContentValues(); - if (contactVisitStartDate != null) { - contentValues.put(DBConstantsUtils.KeyUtils.VISIT_START_DATE, contactVisitStartDate); - } else { - contentValues.putNull(DBConstantsUtils.KeyUtils.VISIT_START_DATE); - } - updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); - } - -} +package org.smartregister.anc.library.repository; + +import android.content.ContentValues; + +import androidx.annotation.NonNull; + +import net.sqlcipher.Cursor; +import net.sqlcipher.database.SQLiteDatabase; + +import org.apache.commons.lang3.StringUtils; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.domain.WomanDetail; +import org.smartregister.anc.library.util.ANCJsonFormUtils; +import org.smartregister.anc.library.util.ConstantsUtils; +import org.smartregister.anc.library.util.DBConstantsUtils; +import org.smartregister.anc.library.util.Utils; +import org.smartregister.repository.BaseRepository; +import org.smartregister.repository.Repository; +import org.smartregister.view.activity.DrishtiApplication; + +import java.util.Calendar; +import java.util.HashMap; +import java.util.Map; + +import timber.log.Timber; + +/** + * Created by ndegwamartin on 14/07/2018. + */ +public class PatientRepository extends BaseRepository { + + private static final String[] projection = getRegisterQueryProvider().mainColumns(); + + /** + * Provides all woman details needed for display and/or editing + * + * @param baseEntityId + * @return {@link Map} + */ + public static Map getWomanProfileDetails(String baseEntityId) { + Cursor cursor = null; + + Map detailsMap = null; + try { + SQLiteDatabase db = getMasterRepository().getReadableDatabase(); + + String query = + "SELECT " + StringUtils.join(projection, ",") + " FROM " + getRegisterQueryProvider().getDemographicTable() + " join " + getRegisterQueryProvider().getDetailsTable() + + " on " + getRegisterQueryProvider().getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = " + getRegisterQueryProvider().getDetailsTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " WHERE " + + getRegisterQueryProvider().getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = ?"; + cursor = db.rawQuery(query, new String[]{baseEntityId}); + if (cursor != null && cursor.moveToFirst()) { + detailsMap = new HashMap<>(); + for (int count = 0; count < projection.length; count++) { + String columnName = cursor.getColumnName(count); + if (columnName != null) { + String columnValue = cursor.getString(cursor.getColumnIndex(columnName)); + if (columnName.equals(DBConstantsUtils.KeyUtils.LAST_NAME) && StringUtils.isBlank(columnValue)) + columnValue = ""; + detailsMap.put(columnName, columnValue); + } + } + } + return detailsMap; + } catch (Exception e) { + Timber.e(e, "%s ==> getWomanProfileDetails()", PatientRepository.class.getCanonicalName()); + } finally { + if (cursor != null) { + cursor.close(); + } + } + return null; + } + + public static boolean isFirstVisit(@NonNull String baseEntityId) { + SQLiteDatabase sqLiteDatabase = getMasterRepository().getReadableDatabase(); + Cursor cursor = sqLiteDatabase.query(getRegisterQueryProvider().getDetailsTable(), + new String[]{DBConstantsUtils.KeyUtils.EDD}, + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = ? ", + new String[]{baseEntityId}, null, null, null, "1"); + String isFirstVisit = null; + if (cursor != null && cursor.moveToFirst()) { + isFirstVisit = cursor.getString(cursor.getColumnIndex(DBConstantsUtils.KeyUtils.EDD)); + cursor.close(); + } + + return StringUtils.isBlank(isFirstVisit); + } + + protected static Repository getMasterRepository() { + return DrishtiApplication.getInstance().getRepository(); + } + + private static RegisterQueryProvider getRegisterQueryProvider() { + return AncLibrary.getInstance().getRegisterQueryProvider(); + } + + public static void updateWomanAlertStatus(String baseEntityId, String alertStatus) { + ContentValues contentValues = new ContentValues(); + contentValues.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, alertStatus); + + updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); + + updateLastInteractedWith(baseEntityId); + } + + public static void updatePatient(String baseEntityId, ContentValues contentValues, String table) { + getMasterRepository().getWritableDatabase() + .update(table, contentValues, DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " = ?", + new String[]{baseEntityId}); + } + + private static void updateLastInteractedWith(String baseEntityId) { + ContentValues lastInteractedWithContentValue = new ContentValues(); + + lastInteractedWithContentValue.put(DBConstantsUtils.KeyUtils.LAST_INTERACTED_WITH, Calendar.getInstance().getTimeInMillis()); + + updatePatient(baseEntityId, lastInteractedWithContentValue, getRegisterQueryProvider().getDemographicTable()); + } + + public static void updateContactVisitDetails(WomanDetail patientDetail, boolean isFinalize) { + ContentValues contentValues = new ContentValues(); + contentValues.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT, patientDetail.getNextContact()); + contentValues.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, patientDetail.getNextContactDate()); + contentValues.put(DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, patientDetail.getYellowFlagCount()); + contentValues.put(DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, patientDetail.getRedFlagCount()); + contentValues.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, patientDetail.getContactStatus()); + if (isFinalize) { + if (!patientDetail.isReferral()) { + contentValues + .put(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, Utils.DB_DF.format(Calendar.getInstance().getTime())); + contentValues.put(DBConstantsUtils.KeyUtils.PREVIOUS_CONTACT_STATUS, patientDetail.getContactStatus()); + } else { + contentValues.put(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, patientDetail.getLastContactRecordDate()); + contentValues.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, patientDetail.getPreviousContactStatus()); + } + } + + updatePatient(patientDetail.getBaseEntityId(), contentValues, getRegisterQueryProvider().getDetailsTable()); + + updateLastInteractedWith(patientDetail.getBaseEntityId()); + } + + /** + * This is a bad hack. Needs to be changed later + * + * @param form + * @param baseEntityId + */ + public static void updateCohabitants(String form, String baseEntityId) { + try { + JSONObject jsonObject = new JSONObject(form); + JSONArray fields = ANCJsonFormUtils.getSingleStepFormfields(jsonObject); + JSONObject cohabitants = ANCJsonFormUtils.getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.COHABITANTS); + JSONObject reminder = ANCJsonFormUtils.getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.REMINDERS); + + String value = cohabitants.optString(ConstantsUtils.KeyUtils.VALUE, "[]"); + String remindersValue = reminder.optString(ConstantsUtils.KeyUtils.VALUE,"{}"); + + ContentValues contentValues = new ContentValues(); + contentValues.put(DBConstantsUtils.KeyUtils.COHABITANTS, value); + contentValues.put(DBConstantsUtils.KeyUtils.REMINDERS,remindersValue); + + updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); + + updateLastInteractedWith(baseEntityId); + } catch (JSONException e) { + Timber.e(e); + } + } + + public static void updateEDDDate(String baseEntityId, String edd) { + + ContentValues contentValues = new ContentValues(); + if (edd != null) { + contentValues.put(DBConstantsUtils.KeyUtils.EDD, edd); + } else { + contentValues.putNull(DBConstantsUtils.KeyUtils.EDD); + } + updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); + } + + public static void updateLastVisitDate(String baseEntityId, String visitDate) { + + ContentValues contentValues = new ContentValues(); + if (visitDate != null) { + contentValues.put(DBConstantsUtils.KeyUtils.LAST_VISIT_DATE, visitDate); + } else { + contentValues.putNull(DBConstantsUtils.KeyUtils.LAST_VISIT_DATE); + } + updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); + } + + public static void updateContactVisitStartDate(String baseEntityId, String contactVisitStartDate) { + + ContentValues contentValues = new ContentValues(); + if (contactVisitStartDate != null) { + contentValues.put(DBConstantsUtils.KeyUtils.VISIT_START_DATE, contactVisitStartDate); + } else { + contentValues.putNull(DBConstantsUtils.KeyUtils.VISIT_START_DATE); + } + updatePatient(baseEntityId, contentValues, getRegisterQueryProvider().getDetailsTable()); + } + +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PreviousContactRepository.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PreviousContactRepository.java index d89658637..8a1c05e54 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PreviousContactRepository.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/PreviousContactRepository.java @@ -1,7 +1,6 @@ package org.smartregister.anc.library.repository; import android.content.ContentValues; -import android.text.TextUtils; import android.util.Log; import com.vijay.jsonwizard.constants.JsonFormConstants; @@ -12,6 +11,7 @@ import org.apache.commons.lang3.StringUtils; import org.jeasy.rules.api.Facts; +import org.json.JSONException; import org.json.JSONObject; import org.smartregister.anc.library.AncLibrary; import org.smartregister.anc.library.model.PreviousContact; @@ -22,7 +22,10 @@ import org.smartregister.repository.BaseRepository; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Objects; import timber.log.Timber; @@ -225,7 +228,7 @@ public Facts getPreviousContactTestsFacts(String baseEntityId) { if (mCursor != null) { while (mCursor.moveToNext()) { String jsonValue = mCursor.getString(mCursor.getColumnIndex(VALUE)); - if (StringUtils.isNotBlank(jsonValue) && jsonValue.trim().charAt(0) == '{') { + if (StringUtils.isNotBlank(jsonValue) && jsonValue.trim().startsWith("{")) { JSONObject valueObject = new JSONObject(jsonValue); String text, translated_text; text = valueObject.optString(JsonFormConstants.TEXT).trim(); @@ -258,7 +261,7 @@ public Facts getPreviousContactTestsFacts(String baseEntityId) { */ private Cursor getAllTests(String baseEntityId, SQLiteDatabase database) { String selection = ""; - String orderBy = "MAX("+ ID + ") DESC"; + String orderBy = "MAX( "+ID +") DESC"; String[] selectionArgs = null; if (StringUtils.isNotBlank(baseEntityId)) { @@ -307,80 +310,124 @@ public Facts getAllTestResultsForIndividualTest(String baseEntityId, String indi return allTestResults; } + /** - * Gets the Immediate previous contact's facts. It checks for both referral and normal contacts hence the recursion. + * Gets the immediate previous contact's facts. * * @param baseEntityId {@link String} * @param contactNo {@link String} - * @param checkNegative {@link Boolean} - * @return previousContactsFacts {@link Facts} + * @return Previous contact Facts object if found, otherwise returns null {@link Facts} */ - public Facts getPreviousContactFacts(String baseEntityId, String contactNo, boolean checkNegative) { - Cursor mCursor = null; - String selection = ""; - String orderBy = "MAX("+ ID + ") DESC"; - String[] selectionArgs = null; - Facts previousContactFacts = new Facts(); + public Facts getPreviousContactFacts (String baseEntityId, String contactNo) { + + // Validate input parameters + // Return null if one of the parameters is invalid + if (StringUtils.isBlank(baseEntityId) || StringUtils.isBlank(contactNo) || contactNo.equals("0")) return null; + + // Input parameters are validated + // Get previous contact Facts + + // Prepare to get data from SQLite database + Facts previousContactFacts = null; + SQLiteDatabase db = getReadableDatabase(); + + // Database query components + String selection = BASE_ENTITY_ID + " = ? AND " + CONTACT_NO + " = ?"; + String[] selectionArgs = new String[]{ baseEntityId, contactNo }; + String orderBy = "MAX(" + ID + ") DESC"; + try { - int contactNumber = Integer.parseInt(contactNo); - SQLiteDatabase db = getReadableDatabase(); - if (StringUtils.isNotBlank(baseEntityId) && StringUtils.isNotBlank(contactNo)) { - selection = BASE_ENTITY_ID + " = ? AND " + CONTACT_NO + " = ?"; - selectionArgs = new String[]{baseEntityId, getContactNo(contactNo, checkNegative)}; - } + // Database cursor object + Cursor cursor = db.query(TABLE_NAME, projectionArgs, selection, selectionArgs, KEY, null, orderBy, null); - mCursor = db.query(TABLE_NAME, projectionArgs, selection, selectionArgs, KEY, null, orderBy, null); + // If the cursor found data, process it as Facts object + Map processedData = new HashMap<>(); - if (mCursor != null && mCursor.getCount() > 0) { - while (mCursor.moveToNext()) { - String previousContactValue = mCursor.getString(mCursor.getColumnIndex(VALUE)); - if (StringUtils.isNotBlank(previousContactValue) && previousContactValue.trim().charAt(0) == '{') { - JSONObject previousContactObject = new JSONObject(previousContactValue); - if (previousContactObject.has(JsonFormConstants.KEY) && previousContactObject.has(JsonFormConstants.TEXT)) { - String translated_text, text; - text = previousContactObject.optString(JsonFormConstants.TEXT).trim(); - translated_text = StringUtils.isNotBlank(text) ? NativeFormLangUtils.translateDatabaseString(text, AncLibrary.getInstance().getApplicationContext()) : ""; - previousContactFacts.put(mCursor.getString(mCursor.getColumnIndex(KEY)), translated_text); - } else { - previousContactFacts.put(mCursor.getString(mCursor.getColumnIndex(KEY)), previousContactValue); - } - } else { - previousContactFacts.put(mCursor.getString(mCursor.getColumnIndex(KEY)), previousContactValue); - } + // Process the retrieved data + while (cursor.moveToNext()) { + + // Process key and value + String key = ""; + String value = ""; + int keyColumnIndex = cursor.getColumnIndex(KEY); + int valueColumnIndex = cursor.getColumnIndex(VALUE); + if (keyColumnIndex >= 0 && valueColumnIndex >= 0) { + key = cursor.getString(keyColumnIndex); + value = cursor.getString(valueColumnIndex); } - previousContactFacts.put(CONTACT_NO, selectionArgs[1]); - return previousContactFacts; - } else if (contactNumber > 0) { - return getPreviousContactFacts(baseEntityId, contactNo, false); + + // Check if value is a JSON, then process it accordingly + try { + JSONObject valueObject = new JSONObject(value); + String text = valueObject.optString(JsonFormConstants.TEXT).trim(); + String translatedText = (StringUtils.isBlank(text)) ? text : NativeFormLangUtils.translateDatabaseString(text, AncLibrary.getInstance().getApplicationContext()); + value = (StringUtils.isBlank(translatedText)) ? value : translatedText; + } catch (JSONException exp) { + // Value is not JSON string, do not modify value + } + + if (StringUtils.isNotBlank(key) && StringUtils.isNotBlank(value)) { + processedData.put(key, value); + } + } - } catch (Exception e) { - Log.e(TAG, e.toString(), e); - } finally { - if (mCursor != null) { - mCursor.close(); + + // Assign Facts with processedData + if (processedData.size() > 0) { + previousContactFacts = new Facts(); + previousContactFacts.put(CONTACT_NO, contactNo); + for (Map.Entry entry : processedData.entrySet()) { + previousContactFacts.put(entry.getKey(), entry.getValue()); + } } + + } + + // Cannot get previous contact Facts + catch(Exception error) { + Timber.d(error); } return previousContactFacts; } + /** - * Returns contact numbers according to the @param checkNegative. If true then it just uses the initial contact. If - * true the it would return a previous|referral contact + * Gets the immediate previous contact's facts. * - * @param previousContact {@link String} - * @param checkNegative {@link Boolean} - * @return contactNo {@link String} + * @param baseEntityId {@link String} + * @param contactNo {@link String} + * @param checkNegative {@link Boolean} + * @return Previous contact Facts if found, otherwise empty Facts object {@link Facts} */ - private String getContactNo(String previousContact, boolean checkNegative) { - String contactNo = previousContact; - if (!TextUtils.isEmpty(previousContact) && checkNegative) { - contactNo = "-" + (Integer.parseInt(previousContact) + 1); + public Facts getPreviousContactFacts(String baseEntityId, String contactNo, boolean checkNegative) { + + // Maximum contactNo of negative contact to search for + final int maxNegativeContactNo = -10; + + // Facts object that holds the return value + Facts previousContactFacts = null; + + // Search for current contactNo + previousContactFacts = getPreviousContactFacts(baseEntityId, contactNo); + + // If the checkNegative parameter is true, search for negative (referral) contacts + if (checkNegative) { + Facts negativeContact = null; + int currentContactNo = maxNegativeContactNo; + while ((currentContactNo < 0) && (negativeContact == null)) { + negativeContact = getPreviousContactFacts(baseEntityId, String.valueOf(currentContactNo)); + currentContactNo++; + } + previousContactFacts = (negativeContact == null) ? previousContactFacts : negativeContact; } - return contactNo; + // Return previous contact Facts + // Return empty Facts object if previousContactFacts is null + return (previousContactFacts == null) ? new Facts() : previousContactFacts; + } /** @@ -424,4 +471,5 @@ public Facts getImmediatePreviousSchedule(String baseEntityId, String contactNo) return schedule; } + } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/RegisterQueryProvider.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/RegisterQueryProvider.java index 6b08f091d..bba9188b7 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/RegisterQueryProvider.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/repository/RegisterQueryProvider.java @@ -69,18 +69,48 @@ public String mainRegisterQuery() { } public String[] mainColumns() { - return new String[]{DBConstantsUtils.KeyUtils.FIRST_NAME, DBConstantsUtils.KeyUtils.LAST_NAME, DBConstantsUtils.KeyUtils.DOB, - DBConstantsUtils.KeyUtils.DOB_UNKNOWN, getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PHONE_NUMBER, getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_NAME, - getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER, getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID, - getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " as " + DBConstantsUtils.KeyUtils.ID_LOWER_CASE, DBConstantsUtils.KeyUtils.ANC_ID, - getDetailsTable() + "." + DBConstantsUtils.KeyUtils.REMINDERS, DBConstantsUtils.KeyUtils.HOME_ADDRESS, getDetailsTable() + "." + DBConstantsUtils.KeyUtils.EDD, - getDetailsTable() + "." + DBConstantsUtils.KeyUtils.CONTACT_STATUS, getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PREVIOUS_CONTACT_STATUS, - getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT, getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, - getDetailsTable() + "." + DBConstantsUtils.KeyUtils.VISIT_START_DATE, getDetailsTable() + "." + DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, - getDetailsTable() + "." + DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, getDetailsTable() + "." + DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, - getDetailsTable() + "." + DBConstantsUtils.KeyUtils.COHABITANTS, getDemographicTable() + "." + DBConstantsUtils.KeyUtils.RELATIONAL_ID, - getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.PROVINCE, getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.DISTRICT, - getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.SUB_DISTRICT, getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.FACILITY, - getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.VILLAGE}; + return new String[]{ + + // Base WHO ANC fields + DBConstantsUtils.KeyUtils.ANC_ID, + DBConstantsUtils.KeyUtils.FIRST_NAME, + DBConstantsUtils.KeyUtils.LAST_NAME, + DBConstantsUtils.KeyUtils.DOB, + DBConstantsUtils.KeyUtils.DOB_UNKNOWN, + DBConstantsUtils.KeyUtils.HOME_ADDRESS, + getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID + " as " + DBConstantsUtils.KeyUtils.ID_LOWER_CASE, + getDemographicTable() + "." + DBConstantsUtils.KeyUtils.RELATIONAL_ID, + getDemographicTable() + "." + DBConstantsUtils.KeyUtils.BASE_ENTITY_ID, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PHONE_NUMBER, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_NAME, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.REMINDERS, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.EDD, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.CONTACT_STATUS, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PREVIOUS_CONTACT_STATUS, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.VISIT_START_DATE, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.COHABITANTS, + getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.PROVINCE, + getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.DISTRICT, + getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.SUB_DISTRICT, + getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.FACILITY, + getDetailsTable() + "." + ConstantsUtils.SpinnerKeyConstants.VILLAGE, + + // Additional local fields + DBConstantsUtils.KeyUtils.UID, + DBConstantsUtils.KeyUtils.SSN, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.SSN_STATUS, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.UID_UNKNOWN, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.UID_UNKNOWN_REASON, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PHONE_NUMBER_UNKNOWN, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.PHONE_NUMBER_UNKNOWN_REASON, + getDetailsTable() + "." + DBConstantsUtils.KeyUtils.LAST_VISIT_DATE + + }; } } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/rule/ContactRule.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/rule/ContactRule.java index 0f8de53ba..d7cd9df8d 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/rule/ContactRule.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/rule/ContactRule.java @@ -18,14 +18,10 @@ public class ContactRule { public Set set; public ContactRule(int wks, boolean isFirst, String baseEntityId) { - this.baseEntityId = baseEntityId; - this.initialVisit = wks; this.currentVisit = wks; - this.isFirst = isFirst; - this.set = new HashSet<>(); } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/sync/BaseAncClientProcessorForJava.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/sync/BaseAncClientProcessorForJava.java index e77e2ad32..477124c0c 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/sync/BaseAncClientProcessorForJava.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/sync/BaseAncClientProcessorForJava.java @@ -1,301 +1,301 @@ -package org.smartregister.anc.library.sync; - -import android.content.ContentValues; -import android.content.Context; -import android.content.SharedPreferences; -import android.preference.PreferenceManager; -import android.text.TextUtils; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.google.gson.reflect.TypeToken; -import com.vijay.jsonwizard.constants.JsonFormConstants; - -import org.apache.commons.lang3.StringUtils; -import org.jetbrains.annotations.NotNull; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.smartregister.anc.library.AncLibrary; -import org.smartregister.anc.library.helper.ECSyncHelper; -import org.smartregister.anc.library.model.PreviousContact; -import org.smartregister.anc.library.model.Task; -import org.smartregister.anc.library.repository.ContactTasksRepository; -import org.smartregister.anc.library.util.ANCJsonFormUtils; -import org.smartregister.anc.library.util.ConstantsUtils; -import org.smartregister.anc.library.util.DBConstantsUtils; -import org.smartregister.commonregistry.AllCommonsRepository; -import org.smartregister.domain.Client; -import org.smartregister.domain.Event; -import org.smartregister.domain.db.EventClient; -import org.smartregister.domain.jsonmapping.ClientClassification; -import org.smartregister.domain.jsonmapping.ClientField; -import org.smartregister.domain.jsonmapping.Table; -import org.smartregister.repository.AllSharedPreferences; -import org.smartregister.repository.DetailsRepository; -import org.smartregister.sync.ClientProcessorForJava; -import org.smartregister.sync.MiniClientProcessorForJava; - -import java.util.ArrayList; -import java.util.Calendar; -import java.util.HashSet; -import java.util.List; -import java.util.Map; - -import timber.log.Timber; - -/** - * Created by ndegwamartin on 15/03/2018. - */ - -public class BaseAncClientProcessorForJava extends ClientProcessorForJava implements MiniClientProcessorForJava { - private HashSet eventTypes = new HashSet<>(); - - public BaseAncClientProcessorForJava(Context context) { - super(context); - } - - public static BaseAncClientProcessorForJava getInstance(Context context) { - if (instance == null) { - instance = new BaseAncClientProcessorForJava(context); - } - - return (BaseAncClientProcessorForJava) instance; - } - - @Override - public void processClient(List eventClients) throws Exception { - Timber.d("Inside the BaseAncClientProcessorForJava"); - ClientClassification clientClassification = - assetJsonToJava(ConstantsUtils.EcFileUtils.CLIENT_CLASSIFICATION, ClientClassification.class); - - if (!eventClients.isEmpty()) { - List unsyncEvents = new ArrayList<>(); - for (EventClient eventClient : eventClients) { - processEventClient(eventClient, unsyncEvents, clientClassification); - } - - // Unsync events that are should not be in this device - if (!unsyncEvents.isEmpty()) { - unSync(unsyncEvents); - } - } - } - - private void processVisit(Event event) { - //Attention flags - getDetailsRepository() - .add(event.getBaseEntityId(), ConstantsUtils.DetailsKeyUtils.ATTENTION_FLAG_FACTS, - event.getDetails().get(ConstantsUtils.DetailsKeyUtils.ATTENTION_FLAG_FACTS), - Calendar.getInstance().getTimeInMillis()); - processPreviousContacts(event); - processContactTasks(event); - - } - - private boolean unSync(ECSyncHelper ecSyncHelper, DetailsRepository detailsRepository, List bindObjects, - Event event, String registeredAnm) { - try { - String baseEntityId = event.getBaseEntityId(); - String providerId = event.getProviderId(); - - if (providerId.equals(registeredAnm)) { - ecSyncHelper.deleteEventsByBaseEntityId(baseEntityId); - ecSyncHelper.deleteClient(baseEntityId); - detailsRepository.deleteDetails(baseEntityId); - - for (Table bindObject : bindObjects) { - String tableName = bindObject.name; - deleteCase(tableName, baseEntityId); - } - - return true; - } - } catch (Exception e) { - Timber.e(e); - } - return false; - } - - public DetailsRepository getDetailsRepository() { - return AncLibrary.getInstance().getDetailsRepository(); - } - - private void processPreviousContacts(Event event) { - //Previous contact state - String previousContactsRaw = event.getDetails().get(ConstantsUtils.DetailsKeyUtils.PREVIOUS_CONTACTS); - Map previousContactMap = getPreviousContactMap(previousContactsRaw); - - if (previousContactMap != null) { - String contactNo = getContact(event); - for (Map.Entry entry : previousContactMap.entrySet()) { - AncLibrary.getInstance().getPreviousContactRepository().savePreviousContact( - new PreviousContact(event.getBaseEntityId(), entry.getKey(), entry.getValue(), contactNo)); - } - } - } - - private void processContactTasks(Event event) { - try { - String openTasks = event.getDetails().get(ConstantsUtils.DetailsKeyUtils.OPEN_TEST_TASKS); - if (StringUtils.isNotBlank(openTasks)) { - JSONArray openTasksArray = new JSONArray(openTasks); - getContactTasksRepository().deleteAllTasks(event.getBaseEntityId()); - for (int i = 0; i < openTasksArray.length(); i++) { - JSONObject tasks = new JSONObject(openTasksArray.getString(i)); - String key = tasks.optString(JsonFormConstants.KEY); - - Task task = getTask(tasks, key, event.getBaseEntityId()); - getContactTasksRepository().saveOrUpdateTasks(task); - } - } - } catch (JSONException e) { - Timber.e(e, " --> processContactTasks"); - } - } - - public Map getPreviousContactMap(String previousContactsRaw) { - return AncLibrary.getInstance().getGsonInstance().fromJson(previousContactsRaw, new TypeToken>() { - }.getType()); - } - - @NotNull - private String getContact(Event event) { - String contactNo = ""; - if (!TextUtils.isEmpty(event.getDetails().get(ConstantsUtils.CONTACT))) { - String[] contacts = event.getDetails().get(ConstantsUtils.CONTACT).split(" "); - if (contacts.length >= 2) { - int nextContact = Integer.parseInt(contacts[1]); - if (nextContact > 0) { - contactNo = String.valueOf(nextContact - 1); - } else { - contactNo = String.valueOf(nextContact + 1); - } - } - } - return contactNo; - } - - @NotNull - private Task getTask(JSONObject field, String key, String baseEntityId) { - Task task = new Task(); - task.setBaseEntityId(baseEntityId); - task.setKey(key); - task.setValue(String.valueOf(field)); - task.setUpdated(false); - task.setComplete(ANCJsonFormUtils.checkIfTaskIsComplete(field)); - task.setCreatedAt(Calendar.getInstance().getTimeInMillis()); - return task; - } - - public ContactTasksRepository getContactTasksRepository() { - return AncLibrary.getInstance().getContactTasksRepository(); - } - - @Override - public void updateFTSsearch(String tableName, String entityId, ContentValues contentValues) { - AllCommonsRepository allCommonsRepository = org.smartregister.CoreLibrary.getInstance().context().allCommonsRepositoryobjects(tableName); - - if (allCommonsRepository != null) { - allCommonsRepository.updateSearch(entityId); - } - } - - @Override - public String[] getOpenmrsGenIds() { - /* - This method is not currently used because the ANC_ID is always a number and does not contain hyphens. - This method is used to get the identifiers used by OpenMRS so that we remove the hyphens in the - content values for such identifiers - */ - return new String[]{DBConstantsUtils.KeyUtils.ANC_ID, ConstantsUtils.JsonFormKeyUtils.ANC_ID}; - } - - @Override - public void processEventClient(@NonNull EventClient eventClient, @NonNull List unsyncEvents, @Nullable ClientClassification clientClassification) throws Exception { - Event event = eventClient.getEvent(); - if (event == null) { - return; - } - - String eventType = event.getEventType(); - if (StringUtils.isBlank(eventType)) { - return; - } - Client client = eventClient.getClient(); - switch (eventType) { - case ConstantsUtils.EventTypeUtils.CLOSE: - case ConstantsUtils.EventTypeUtils.REGISTRATION: - case ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION: - if (clientClassification == null) { - return; - } - //iterate through the events - if (client != null) { - processEvent(event, client, clientClassification); - } - break; - case ConstantsUtils.EventTypeUtils.CONTACT_VISIT: - processVisit(event); - break; - default: - break; - } - } - - @Override - public boolean unSync(@Nullable List events) { - try { - - if (events == null || events.isEmpty()) { - return false; - } - - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext()); - AllSharedPreferences allSharedPreferences = new AllSharedPreferences(preferences); - String registeredAnm = allSharedPreferences.fetchRegisteredANM(); - - ClientField clientField = assetJsonToJava(ConstantsUtils.EcFileUtils.CLIENT_FIELDS, ClientField.class); - if (clientField == null) { - return false; - } - - List
bindObjects = clientField.bindobjects; - DetailsRepository detailsRepository = AncLibrary.getInstance().getContext().detailsRepository(); - ECSyncHelper ecUpdater = ECSyncHelper.getInstance(getContext()); - - for (Event event : events) { - unSync(ecUpdater, detailsRepository, bindObjects, event, registeredAnm); - } - - return true; - - } catch (Exception e) { - Timber.e(e, " --> unSync"); - } - - return false; - } - - - @NonNull - @Override - public HashSet getEventTypes() { - if (eventTypes.isEmpty()) { - eventTypes.add(ConstantsUtils.EventTypeUtils.REGISTRATION); - eventTypes.add(ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION); - eventTypes.add(ConstantsUtils.EventTypeUtils.QUICK_CHECK); - eventTypes.add(ConstantsUtils.EventTypeUtils.CONTACT_VISIT); - eventTypes.add(ConstantsUtils.EventTypeUtils.CLOSE); - eventTypes.add(ConstantsUtils.EventTypeUtils.SITE_CHARACTERISTICS); - } - - return eventTypes; - } - - @Override - public boolean canProcess(@NonNull String eventType) { - return getEventTypes().contains(eventType); - } +package org.smartregister.anc.library.sync; + +import android.content.ContentValues; +import android.content.Context; +import android.content.SharedPreferences; +import android.preference.PreferenceManager; +import android.text.TextUtils; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.google.gson.reflect.TypeToken; +import com.vijay.jsonwizard.constants.JsonFormConstants; + +import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.NotNull; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.helper.ECSyncHelper; +import org.smartregister.anc.library.model.PreviousContact; +import org.smartregister.anc.library.model.Task; +import org.smartregister.anc.library.repository.ContactTasksRepository; +import org.smartregister.anc.library.util.ANCJsonFormUtils; +import org.smartregister.anc.library.util.ConstantsUtils; +import org.smartregister.anc.library.util.DBConstantsUtils; +import org.smartregister.commonregistry.AllCommonsRepository; +import org.smartregister.domain.Client; +import org.smartregister.domain.Event; +import org.smartregister.domain.db.EventClient; +import org.smartregister.domain.jsonmapping.ClientClassification; +import org.smartregister.domain.jsonmapping.ClientField; +import org.smartregister.domain.jsonmapping.Table; +import org.smartregister.repository.AllSharedPreferences; +import org.smartregister.repository.DetailsRepository; +import org.smartregister.sync.ClientProcessorForJava; +import org.smartregister.sync.MiniClientProcessorForJava; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.HashSet; +import java.util.List; +import java.util.Map; + +import timber.log.Timber; + +/** + * Created by ndegwamartin on 15/03/2018. + */ + +public class BaseAncClientProcessorForJava extends ClientProcessorForJava implements MiniClientProcessorForJava { + private HashSet eventTypes = new HashSet<>(); + + public BaseAncClientProcessorForJava(Context context) { + super(context); + } + + public static BaseAncClientProcessorForJava getInstance(Context context) { + if (instance == null) { + instance = new BaseAncClientProcessorForJava(context); + } + + return (BaseAncClientProcessorForJava) instance; + } + + @Override + public void processClient(List eventClients) throws Exception { + Timber.d("Inside the BaseAncClientProcessorForJava"); + ClientClassification clientClassification = + assetJsonToJava(ConstantsUtils.EcFileUtils.CLIENT_CLASSIFICATION, ClientClassification.class); + + if (!eventClients.isEmpty()) { + List unsyncEvents = new ArrayList<>(); + for (EventClient eventClient : eventClients) { + processEventClient(eventClient, unsyncEvents, clientClassification); + } + + // Unsync events that are should not be in this device + if (!unsyncEvents.isEmpty()) { + unSync(unsyncEvents); + } + } + } + + private void processVisit(Event event) { + //Attention flags + getDetailsRepository() + .add(event.getBaseEntityId(), ConstantsUtils.DetailsKeyUtils.ATTENTION_FLAG_FACTS, + event.getDetails().get(ConstantsUtils.DetailsKeyUtils.ATTENTION_FLAG_FACTS), + Calendar.getInstance().getTimeInMillis()); + processPreviousContacts(event); + processContactTasks(event); + + } + + private boolean unSync(ECSyncHelper ecSyncHelper, DetailsRepository detailsRepository, List
bindObjects, + Event event, String registeredAnm) { + try { + String baseEntityId = event.getBaseEntityId(); + String providerId = event.getProviderId(); + + if (providerId.equals(registeredAnm)) { + ecSyncHelper.deleteEventsByBaseEntityId(baseEntityId); + ecSyncHelper.deleteClient(baseEntityId); + detailsRepository.deleteDetails(baseEntityId); + + for (Table bindObject : bindObjects) { + String tableName = bindObject.name; + deleteCase(tableName, baseEntityId); + } + + return true; + } + } catch (Exception e) { + Timber.e(e); + } + return false; + } + + public DetailsRepository getDetailsRepository() { + return AncLibrary.getInstance().getDetailsRepository(); + } + + private void processPreviousContacts(Event event) { + //Previous contact state + String previousContactsRaw = event.getDetails().get(ConstantsUtils.DetailsKeyUtils.PREVIOUS_CONTACTS); + Map previousContactMap = getPreviousContactMap(previousContactsRaw); + + if (previousContactMap != null) { + String contactNo = getContact(event); + for (Map.Entry entry : previousContactMap.entrySet()) { + AncLibrary.getInstance().getPreviousContactRepository().savePreviousContact( + new PreviousContact(event.getBaseEntityId(), entry.getKey(), entry.getValue(), contactNo)); + } + } + } + + private void processContactTasks(Event event) { + try { + String openTasks = event.getDetails().get(ConstantsUtils.DetailsKeyUtils.OPEN_TEST_TASKS); + if (StringUtils.isNotBlank(openTasks)) { + JSONArray openTasksArray = new JSONArray(openTasks); + getContactTasksRepository().deleteAllTasks(event.getBaseEntityId()); + for (int i = 0; i < openTasksArray.length(); i++) { + JSONObject tasks = new JSONObject(openTasksArray.getString(i)); + String key = tasks.optString(JsonFormConstants.KEY); + + Task task = getTask(tasks, key, event.getBaseEntityId()); + getContactTasksRepository().saveOrUpdateTasks(task); + } + } + } catch (JSONException e) { + Timber.e(e, " --> processContactTasks"); + } + } + + public Map getPreviousContactMap(String previousContactsRaw) { + return AncLibrary.getInstance().getGsonInstance().fromJson(previousContactsRaw, new TypeToken>() { + }.getType()); + } + + @NotNull + private String getContact(Event event) { + String contactNo = ""; + if (!TextUtils.isEmpty(event.getDetails().get(ConstantsUtils.CONTACT))) { + String[] contacts = event.getDetails().get(ConstantsUtils.CONTACT).split(" "); + if (contacts.length >= 2) { + int nextContact = Integer.parseInt(contacts[1]); + if (nextContact > 0) { + contactNo = String.valueOf(nextContact - 1); + } else { + contactNo = String.valueOf(nextContact + 1); + } + } + } + return contactNo; + } + + @NotNull + private Task getTask(JSONObject field, String key, String baseEntityId) { + Task task = new Task(); + task.setBaseEntityId(baseEntityId); + task.setKey(key); + task.setValue(String.valueOf(field)); + task.setUpdated(false); + task.setComplete(ANCJsonFormUtils.checkIfTaskIsComplete(field)); + task.setCreatedAt(Calendar.getInstance().getTimeInMillis()); + return task; + } + + public ContactTasksRepository getContactTasksRepository() { + return AncLibrary.getInstance().getContactTasksRepository(); + } + + @Override + public void updateFTSsearch(String tableName, String entityId, ContentValues contentValues) { + AllCommonsRepository allCommonsRepository = org.smartregister.CoreLibrary.getInstance().context().allCommonsRepositoryobjects(tableName); + + if (allCommonsRepository != null) { + allCommonsRepository.updateSearch(entityId); + } + } + + @Override + public String[] getOpenmrsGenIds() { + /* + This method is not currently used because the ANC_ID is always a number and does not contain hyphens. + This method is used to get the identifiers used by OpenMRS so that we remove the hyphens in the + content values for such identifiers + */ + return new String[]{DBConstantsUtils.KeyUtils.ANC_ID, ConstantsUtils.JsonFormKeyUtils.ANC_ID}; + } + + @Override + public void processEventClient(@NonNull EventClient eventClient, @NonNull List unsyncEvents, @Nullable ClientClassification clientClassification) throws Exception { + Event event = eventClient.getEvent(); + if (event == null) { + return; + } + + String eventType = event.getEventType(); + if (StringUtils.isBlank(eventType)) { + return; + } + Client client = eventClient.getClient(); + switch (eventType) { + case ConstantsUtils.EventTypeUtils.CLOSE: + case ConstantsUtils.EventTypeUtils.REGISTRATION: + case ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION: + if (clientClassification == null) { + return; + } + //iterate through the events + if (client != null) { + processEvent(event, client, clientClassification); + } + break; + case ConstantsUtils.EventTypeUtils.CONTACT_VISIT: + processVisit(event); + break; + default: + break; + } + } + + @Override + public boolean unSync(@Nullable List events) { + try { + + if (events == null || events.isEmpty()) { + return false; + } + + SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext()); + AllSharedPreferences allSharedPreferences = new AllSharedPreferences(preferences); + String registeredAnm = allSharedPreferences.fetchRegisteredANM(); + + ClientField clientField = assetJsonToJava(ConstantsUtils.EcFileUtils.CLIENT_FIELDS, ClientField.class); + if (clientField == null) { + return false; + } + + List
bindObjects = clientField.bindobjects; + DetailsRepository detailsRepository = AncLibrary.getInstance().getContext().detailsRepository(); + ECSyncHelper ecUpdater = ECSyncHelper.getInstance(getContext()); + + for (Event event : events) { + unSync(ecUpdater, detailsRepository, bindObjects, event, registeredAnm); + } + + return true; + + } catch (Exception e) { + Timber.e(e, " --> unSync"); + } + + return false; + } + + + @NonNull + @Override + public HashSet getEventTypes() { + if (eventTypes.isEmpty()) { + eventTypes.add(ConstantsUtils.EventTypeUtils.REGISTRATION); + eventTypes.add(ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION); + eventTypes.add(ConstantsUtils.EventTypeUtils.QUICK_CHECK); + eventTypes.add(ConstantsUtils.EventTypeUtils.CONTACT_VISIT); + eventTypes.add(ConstantsUtils.EventTypeUtils.CLOSE); + eventTypes.add(ConstantsUtils.EventTypeUtils.SITE_CHARACTERISTICS); + } + + return eventTypes; + } + + @Override + public boolean canProcess(@NonNull String eventType) { + return getEventTypes().contains(eventType); + } } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/task/AttentionFlagsTask.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/task/AttentionFlagsTask.java index 275b72a73..5a30e0faf 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/task/AttentionFlagsTask.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/task/AttentionFlagsTask.java @@ -70,7 +70,7 @@ protected void addAttentionFlagsService() { } } } catch (Exception e) { - Timber.e(e, " --> "); + Timber.e(e); } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/task/FetchProfileDataTask.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/task/FetchProfileDataTask.java index b66564f2a..e06f9a26f 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/task/FetchProfileDataTask.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/task/FetchProfileDataTask.java @@ -1,38 +1,38 @@ -package org.smartregister.anc.library.task; - -import org.smartregister.anc.library.event.ClientDetailsFetchedEvent; -import org.smartregister.anc.library.repository.PatientRepository; -import org.smartregister.anc.library.util.AppExecutors; -import org.smartregister.anc.library.util.Utils; - -import java.util.Map; - -/** - * Created by ndegwamartin on 13/07/2018. - */ -public class FetchProfileDataTask { - - private boolean isForEdit; - private AppExecutors appExecutors; - - public FetchProfileDataTask(boolean isForEdit) { - this.isForEdit = isForEdit; - } - - public void execute(String baseEntityId) { - appExecutors = new AppExecutors(); - appExecutors.diskIO().execute(() -> { - Map client = this.getWomanDetailsOnBackground(baseEntityId); - appExecutors.mainThread().execute(() -> postStickEventOnPostExec(client)); - }); - - } - - private Map getWomanDetailsOnBackground(String baseEntityId) { - return PatientRepository.getWomanProfileDetails(baseEntityId); - } - - protected void postStickEventOnPostExec(Map client) { - Utils.postStickyEvent(new ClientDetailsFetchedEvent(client, isForEdit)); - } -} +package org.smartregister.anc.library.task; + +import org.smartregister.anc.library.event.ClientDetailsFetchedEvent; +import org.smartregister.anc.library.repository.PatientRepository; +import org.smartregister.anc.library.util.AppExecutors; +import org.smartregister.anc.library.util.Utils; + +import java.util.Map; + +/** + * Created by ndegwamartin on 13/07/2018. + */ +public class FetchProfileDataTask { + + private boolean isForEdit; + private AppExecutors appExecutors; + + public FetchProfileDataTask(boolean isForEdit) { + this.isForEdit = isForEdit; + } + + public void execute(String baseEntityId) { + appExecutors = new AppExecutors(); + appExecutors.diskIO().execute(() -> { + Map client = this.getWomanDetailsOnBackground(baseEntityId); + appExecutors.mainThread().execute(() -> postStickEventOnPostExec(client)); + }); + + } + + private Map getWomanDetailsOnBackground(String baseEntityId) { + return PatientRepository.getWomanProfileDetails(baseEntityId); + } + + protected void postStickEventOnPostExec(Map client) { + Utils.postStickyEvent(new ClientDetailsFetchedEvent(client, isForEdit)); + } +} diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/task/LoadContactSummaryDataTask.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/task/LoadContactSummaryDataTask.java index 34d5db7a3..88c07b132 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/task/LoadContactSummaryDataTask.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/task/LoadContactSummaryDataTask.java @@ -2,12 +2,14 @@ import android.content.Context; import android.content.Intent; +import android.util.Log; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import org.apache.commons.lang3.StringUtils; import org.jeasy.rules.api.Facts; +import org.json.JSONObject; import org.smartregister.anc.library.R; import org.smartregister.anc.library.activity.ContactSummaryFinishActivity; import org.smartregister.anc.library.adapter.ContactSummaryFinishAdapter; @@ -19,6 +21,8 @@ import org.smartregister.anc.library.util.Utils; import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; import timber.log.Timber; @@ -72,8 +76,13 @@ private void finishAdapterOnPostExecute() { clientDetails = new HashMap<>(); } String edd = StringUtils.isNotBlank(facts.get(DBConstantsUtils.KeyUtils.EDD)) ? facts.get(DBConstantsUtils.KeyUtils.EDD) : clientDetails != null ? Utils.reverseHyphenSeperatedValues(clientDetails.get(ConstantsUtils.EDD), "-") : ""; + String visitDate = StringUtils.isNotBlank(facts.get("visit_date")) ? facts.get("visit_date") : null; String contactNo = String.valueOf(intent.getExtras().getInt(ConstantsUtils.IntentKeyUtils.CONTACT_NO)); + if (visitDate != null) { + PatientRepository.updateLastVisitDate(baseEntityId, Utils.reverseHyphenSeperatedValues(visitDate, "-")); + } + if (edd != null && ((ContactSummaryFinishActivity) context).saveFinishMenuItem != null) { PatientRepository.updateEDDDate(baseEntityId, Utils.reverseHyphenSeperatedValues(edd, "-")); ((ContactSummaryFinishActivity) context).saveFinishMenuItem.setEnabled(true); @@ -81,7 +90,20 @@ private void finishAdapterOnPostExecute() { } else if (edd == null && contactNo.contains("-")) { ((ContactSummaryFinishActivity) context).saveFinishMenuItem.setEnabled(true); } - ContactSummaryFinishAdapter adapter = new ContactSummaryFinishAdapter(context, ((ContactSummaryFinishActivity) context).getYamlConfigList(), facts); + + // Populate facts + Map factsAsMap = facts.asMap(); + Facts populatedFacts = new Facts(); + for (Map.Entry entry : factsAsMap.entrySet()) { + String key = entry.getKey(); + Object valueObject = entry.getValue(); + String text = valueObject != null ? Utils.returnTranslatedStringJoinedValue(valueObject.toString()) : ""; + String value = Utils.getFactInputValue(valueObject.toString()); + populatedFacts.put(key, text); + populatedFacts.put(key + "_value", value); + } + + ContactSummaryFinishAdapter adapter = new ContactSummaryFinishAdapter(context, ((ContactSummaryFinishActivity) context).getYamlConfigList(), populatedFacts); adapter.notifyDataSetChanged(); // set up the RecyclerView RecyclerView recyclerView = ((ContactSummaryFinishActivity) context).findViewById(R.id.contact_summary_finish_recycler); diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ANCFormUtils.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ANCFormUtils.java index a8fb824f1..d2ae70e70 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ANCFormUtils.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ANCFormUtils.java @@ -128,9 +128,14 @@ private static void processRadioButtonsSpecialWidget(JSONObject widget, List allLevels = metadata.getLocationLevels(); - ArrayList healthFacilities = metadata.getHealthFacilityLevels(); - List defaultLocation = LocationHelper.getInstance().generateDefaultLocationHierarchy(allLevels); - List defaultFacility = LocationHelper.getInstance().generateDefaultLocationHierarchy(healthFacilities); - List entireTree = LocationHelper.getInstance().generateLocationHierarchyTree(true, allLevels); - String defaultLocationString = AssetHandler.javaToJsonString(defaultLocation, new TypeToken>() { - }.getType()); - - String defaultFacilityString = AssetHandler.javaToJsonString(defaultFacility, new TypeToken>() { - }.getType()); - - String entireTreeString = AssetHandler.javaToJsonString(entireTree, new TypeToken>() { - }.getType()); - - updateLocationTree(fields, defaultLocationString, defaultFacilityString, entireTreeString); - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> addRegLocHierarchyQuestions"); - } - } - - private static void updateLocationTree(@NonNull JSONArray fields, - @NonNull String defaultLocationString, - @NonNull String defaultFacilityString, - @NonNull String entireTreeString) { - AncMetadata ancMetadata = AncLibrary.getInstance().getAncMetadata(); - if (ancMetadata.getFieldsWithLocationHierarchy() != null && !ancMetadata.getFieldsWithLocationHierarchy().isEmpty()) { - for (int i = 0; i < fields.length(); i++) { - JSONObject widget = fields.optJSONObject(i); - if (ancMetadata.getFieldsWithLocationHierarchy().contains(widget.optString(JsonFormConstants.KEY))) { - if (StringUtils.isNotBlank(entireTreeString)) { - addLocationTree(widget.optString(JsonFormConstants.KEY), widget, entireTreeString, JsonFormConstants.TREE); - } - if (StringUtils.isNotBlank(defaultFacilityString)) { - addLocationTreeDefault(widget.optString(JsonFormConstants.KEY), widget, defaultLocationString); - } - } - } - } - } - - private static void addLocationTree(@NonNull String widgetKey, @NonNull JSONObject widget, @NonNull String updateString, @NonNull String treeType) { - try { - if (widget.optString(JsonFormConstants.KEY).equals(widgetKey)) { - widget.put(treeType, new JSONArray(updateString)); - } - } catch (JSONException e) { - Timber.e(e, "JsonFormUtils --> addLocationTree"); - } - } - - private static void addLocationTreeDefault(@NonNull String widgetKey, @NonNull JSONObject widget, @NonNull String updateString) { - addLocationTree(widgetKey, widget, updateString, JsonFormConstants.DEFAULT); - } - - public static JSONObject getFieldJSONObject(JSONArray jsonArray, String key) { - if (jsonArray == null || jsonArray.length() == 0) { - return null; - } - - for (int i = 0; i < jsonArray.length(); i++) { - JSONObject jsonObject = ANCJsonFormUtils.getJSONObject(jsonArray, i); - String keyVal = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.KEY); - if (keyVal != null && keyVal.equals(key)) { - return jsonObject; - } - } - return null; - } - - public static Pair processRegistrationForm(AllSharedPreferences allSharedPreferences, String jsonString) { - try { - Triple registrationFormParams = validateParameters(jsonString); - - if (!registrationFormParams.getLeft()) { - return null; - } - - JSONObject jsonForm = registrationFormParams.getMiddle(); - JSONArray fields = registrationFormParams.getRight(); - - String entityId = getEntityId(jsonForm); - String encounterType = ANCJsonFormUtils.getString(jsonForm, ENCOUNTER_TYPE); - JSONObject metadata = ANCJsonFormUtils.getJSONObject(jsonForm, METADATA); - addLastInteractedWith(fields); - getDobStrings(fields); - String previousVisitsMap = initializeFirstContactValues(fields); - processLocationFields(fields); - - FormTag formTag = getFormTag(allSharedPreferences); - - Client baseClient = org.smartregister.util.JsonFormUtils.createBaseClient(fields, formTag, entityId); - Event baseEvent = org.smartregister.util.JsonFormUtils - .createEvent(fields, metadata, formTag, entityId, encounterType, DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME); - - if (previousVisitsMap != null) { - baseEvent.addDetails(ConstantsUtils.JsonFormKeyUtils.PREVIOUS_VISITS_MAP, previousVisitsMap); - } - tagSyncMetadata(allSharedPreferences, baseEvent);// tag docs - - return Pair.create(baseClient, baseEvent); - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> processRegistrationForm"); - return null; - } - } - - protected static void processLocationFields(@NonNull JSONArray fields) throws JSONException { - for (int i = 0; i < fields.length(); i++) { - if (fields.optJSONObject(i).has(JsonFormConstants.TYPE) && - fields.optJSONObject(i).optString(JsonFormConstants.TYPE).equals(JsonFormConstants.TREE)) - try { - String rawValue = fields.optJSONObject(i).optString(JsonFormConstants.VALUE); - if (StringUtils.isNotBlank(rawValue)) { - JSONArray valueArray = new JSONArray(rawValue); - if (valueArray.length() > 0) { - String lastLocationName = valueArray.optString(valueArray.length() - 1); - String lastLocationId = LocationHelper.getInstance().getOpenMrsLocationId(lastLocationName); - fields.optJSONObject(i).put(JsonFormConstants.VALUE, lastLocationId); - } - } - } catch (NullPointerException e) { - Timber.e(e); - } catch (IllegalArgumentException e) { - Timber.e(e); - } - } - } - - public static Triple validateParameters(String jsonString) { - - JSONObject jsonForm = ANCJsonFormUtils.toJSONObject(jsonString); - JSONArray fields = ANCJsonFormUtils.fields(jsonForm); - - return Triple.of(jsonForm != null && fields != null, jsonForm, fields); - } - - @NotNull - private static String getEntityId(JSONObject jsonForm) { - String entityId = ANCJsonFormUtils.getString(jsonForm, ANCJsonFormUtils.ENTITY_ID); - if (StringUtils.isBlank(entityId)) { - entityId = ANCJsonFormUtils.generateRandomUUIDString(); - } - return entityId; - } - - private static void addLastInteractedWith(JSONArray fields) throws JSONException { - JSONObject lastInteractedWith = new JSONObject(); - lastInteractedWith.put(ConstantsUtils.KeyUtils.KEY, DBConstantsUtils.KeyUtils.LAST_INTERACTED_WITH); - lastInteractedWith.put(ConstantsUtils.KeyUtils.VALUE, Calendar.getInstance().getTimeInMillis()); - fields.put(lastInteractedWith); - } - - private static void getDobStrings(JSONArray fields) throws JSONException { - JSONObject dobUnknownObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.DOB_UNKNOWN); - JSONArray options = ANCJsonFormUtils.getJSONArray(dobUnknownObject, ConstantsUtils.JsonFormKeyUtils.OPTIONS); - JSONObject option = ANCJsonFormUtils.getJSONObject(options, 0); - String dobUnKnownString = option != null ? option.getString(ANCJsonFormUtils.VALUE) : null; - - if (StringUtils.isNotBlank(dobUnKnownString)) { - dobUnknownObject.put(ANCJsonFormUtils.VALUE, Boolean.valueOf(dobUnKnownString) ? 1 : 0); - } - } - - /*** - * Initializes the values in the mother details table used by contact containers - * @param fields {@link JSONArray} - * @return - * @throws JSONException - */ - private static String initializeFirstContactValues(@NonNull JSONArray fields) throws JSONException { - String strGroup = null; - - int nextContact = 1; - - String nextContactDate = Utils.convertDateFormat(Calendar.getInstance().getTime(), Utils.DB_DF); - - if (ConstantsUtils.DueCheckStrategy.CHECK_FOR_FIRST_CONTACT.equals(Utils.getDueCheckStrategy())) { - HashMap> previousVisitsMap = Utils.buildRepeatingGroupValues(fields, ConstantsUtils.JsonFormKeyUtils.PREVIOUS_VISITS); - if (!previousVisitsMap.isEmpty()) { - - nextContact = previousVisitsMap.size() + 1; - - strGroup = ANCJsonFormUtils.gson.toJson(previousVisitsMap); - - Set>> previousVisitsMapSet = previousVisitsMap.entrySet(); - - HashMap previousVisitsMapItem = new LinkedHashMap<>(); - - for (Map.Entry> entry : previousVisitsMapSet) { - previousVisitsMapItem = entry.getValue(); - } - - JSONObject lastContactDateJSONObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE); - lastContactDateJSONObject.put(ANCJsonFormUtils.VALUE, previousVisitsMapItem.get(ConstantsUtils.JsonFormKeyUtils.VISIT_DATE)); - } - } - JSONObject nextContactJSONObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.NEXT_CONTACT); - if (nextContactJSONObject.has(JsonFormConstants.VALUE) && - "".equals(nextContactJSONObject.getString(JsonFormConstants.VALUE))) { - nextContactJSONObject.put(ANCJsonFormUtils.VALUE, nextContact); - } - - JSONObject nextContactDateJSONObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE); - if (nextContactDateJSONObject.has(JsonFormConstants.VALUE) && - "".equals(nextContactDateJSONObject.getString(JsonFormConstants.VALUE))) { - nextContactDateJSONObject.put(ANCJsonFormUtils.VALUE, nextContactDate); - } - - return strGroup; - } - - - @NotNull - public static FormTag getFormTag(AllSharedPreferences allSharedPreferences) { - FormTag formTag = new FormTag(); - formTag.providerId = allSharedPreferences.fetchRegisteredANM(); - formTag.appVersion = BuildConfig.VERSION_CODE; - formTag.databaseVersion = AncLibrary.getInstance().getDatabaseVersion(); - return formTag; - } - - public static void tagSyncMetadata(AllSharedPreferences allSharedPreferences, Event event) { - String providerId = allSharedPreferences.fetchRegisteredANM(); - event.setProviderId(providerId); - event.setLocationId(allSharedPreferences.fetchDefaultLocalityId(providerId)); - event.setChildLocationId(getChildLocationId(event.getLocationId(), allSharedPreferences)); - event.setTeam(allSharedPreferences.fetchDefaultTeam(providerId)); - event.setTeamId(allSharedPreferences.fetchDefaultTeamId(providerId)); - //event.setVersion(BuildConfig.EVENT_VERSION); - event.setClientApplicationVersion(BuildConfig.VERSION_CODE); - event.setClientDatabaseVersion(AncLibrary.getInstance().getDatabaseVersion()); - } - - @Nullable - public static String getChildLocationId(@NonNull String defaultLocationId, @NonNull AllSharedPreferences allSharedPreferences) { - String currentLocality = allSharedPreferences.fetchCurrentLocality(); - - if (StringUtils.isNotBlank(currentLocality)) { - String currentLocalityId = LocationHelper.getInstance().getOpenMrsLocationId(currentLocality); - if (StringUtils.isNotBlank(currentLocalityId) && !defaultLocationId.equals(currentLocalityId)) { - return currentLocalityId; - } - } - - return null; - } - - public static void mergeAndSaveClient(Client baseClient) throws Exception { - JSONObject updatedClientJson = new JSONObject(org.smartregister.util.JsonFormUtils.gson.toJson(baseClient)); - - JSONObject originalClientJsonObject = - AncLibrary.getInstance().getEcSyncHelper().getClient(baseClient.getBaseEntityId()); - - JSONObject mergedJson = org.smartregister.util.JsonFormUtils.merge(originalClientJsonObject, updatedClientJson); - - //TODO Save edit log ? - - AncLibrary.getInstance().getEcSyncHelper().addClient(baseClient.getBaseEntityId(), mergedJson); - } - - public static void saveImage(String providerId, String entityId, String imageLocation) { - OutputStream outputStream = null; - try { - if (StringUtils.isBlank(imageLocation)) { - return; - } - - File file = FileUtil.createFileFromPath(imageLocation); - if (!file.exists()) { - return; - } - - Bitmap compressedBitmap = AncLibrary.getInstance().getCompressor().compressToBitmap(file); - if (compressedBitmap == null || StringUtils.isBlank(providerId) || StringUtils.isBlank(entityId)) { - return; - } - - if (!entityId.isEmpty()) { - final String absoluteFileName = DrishtiApplication.getAppDir() + File.separator + entityId + ".JPEG"; - - File outputFile = FileUtil.createFileFromPath(absoluteFileName); - outputStream = FileUtil.createFileOutputStream(outputFile); - Bitmap.CompressFormat compressFormat = Bitmap.CompressFormat.JPEG; - compressedBitmap.compress(compressFormat, 100, outputStream); - // insert into the db - ProfileImage profileImage = getProfileImage(providerId, entityId, absoluteFileName); - ImageRepository imageRepository = AncLibrary.getInstance().getContext().imageRepository(); - imageRepository.add(profileImage); - } - - } catch (FileNotFoundException e) { - Timber.e("Failed to save static image to disk"); - } catch (IOException e) { - Timber.e(e, " --> saveImage"); - } finally { - if (outputStream != null) { - try { - outputStream.close(); - } catch (IOException e) { - Timber.e("Failed to close static images output stream after attempting to write image"); - } - } - } - } - - @NotNull - private static ProfileImage getProfileImage(String providerId, String entityId, String absoluteFileName) { - ProfileImage profileImage = new ProfileImage(); - profileImage.setImageid(UUID.randomUUID().toString()); - profileImage.setAnmId(providerId); - profileImage.setEntityID(entityId); - profileImage.setFilepath(absoluteFileName); - profileImage.setFilecategory(ConstantsUtils.FileCategoryUtils.PROFILE_PIC); - profileImage.setSyncStatus(ImageRepository.TYPE_Unsynced); - return profileImage; - } - - public static String getString(String jsonString, String field) { - return ANCJsonFormUtils.getString(ANCJsonFormUtils.toJSONObject(jsonString), field); - } - - public static String getFieldValue(String jsonString, String key) { - JSONObject jsonForm = ANCJsonFormUtils.toJSONObject(jsonString); - if (jsonForm == null) { - return null; - } - - JSONArray fields = ANCJsonFormUtils.fields(jsonForm); - if (fields == null) { - return null; - } - - return ANCJsonFormUtils.getFieldValue(fields, key); - - } - - public static String getAutoPopulatedJsonEditRegisterFormString(Context context, Map womanClient) { - try { - JSONObject form = FormUtils.getInstance(context).getFormJson(ConstantsUtils.JsonFormUtils.ANC_REGISTER); - LocationPickerView lpv = createLocationPickerView(context); - if (lpv != null) { - lpv.init(); - } - - Timber.d("Form is %s", form.toString()); - - if (form != null) { - form.put(ANCJsonFormUtils.ENTITY_ID, womanClient.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID)); - form.put(ANCJsonFormUtils.ENCOUNTER_TYPE, ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION); - - JSONObject metadata = form.getJSONObject(ANCJsonFormUtils.METADATA); - String lastLocationId = - lpv != null ? LocationHelper.getInstance().getOpenMrsLocationId(lpv.getSelectedItem()) : ""; - - metadata.put(ANCJsonFormUtils.ENCOUNTER_LOCATION, lastLocationId); - - form.put(ConstantsUtils.CURRENT_OPENSRP_ID, womanClient.get(DBConstantsUtils.KeyUtils.ANC_ID).replace("-", "")); - - //inject opensrp id into the form - JSONObject stepOne = form.getJSONObject(ANCJsonFormUtils.STEP1); - JSONArray jsonArray = stepOne.getJSONArray(ANCJsonFormUtils.FIELDS); - for (int i = 0; i < jsonArray.length(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - - processPopulatableFields(womanClient, jsonObject); - - } - - return form.toString(); - } - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> getAutoPopulatedJsonEditRegisterFormString"); - } - - return ""; - } - - private static LocationPickerView createLocationPickerView(Context context) { - try { - return new LocationPickerView(context); - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> createLocationPickerView"); - return null; - } - } - - protected static void processPopulatableFields(Map womanClient, JSONObject jsonObject) - throws JSONException { - - AncMetadata ancMetadata = AncLibrary.getInstance().getAncMetadata(); - - if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.JsonFormKeyUtils.DOB_ENTERED)) { - getDobUsingEdd(womanClient, jsonObject, DBConstantsUtils.KeyUtils.DOB); - - } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(DBConstantsUtils.KeyUtils.HOME_ADDRESS)) { - String homeAddress = womanClient.get(DBConstantsUtils.KeyUtils.HOME_ADDRESS); - jsonObject.put(ANCJsonFormUtils.VALUE, homeAddress); - - } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.WOM_IMAGE)) { - getPhotoFieldValue(womanClient, jsonObject); - } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(DBConstantsUtils.KeyUtils.DOB_UNKNOWN)) { - jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); - JSONObject optionsObject = jsonObject.getJSONArray(ConstantsUtils.JsonFormKeyUtils.OPTIONS).getJSONObject(0); - optionsObject.put(ANCJsonFormUtils.VALUE, womanClient.get(DBConstantsUtils.KeyUtils.DOB_UNKNOWN)); - - } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.KeyUtils.AGE_ENTERED)) { - jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); - if (StringUtils.isNotBlank(womanClient.get(DBConstantsUtils.KeyUtils.DOB))) { - jsonObject.put(ANCJsonFormUtils.VALUE, Utils.getAgeFromDate(womanClient.get(DBConstantsUtils.KeyUtils.DOB))); - } - } else if (ancMetadata != null && ancMetadata.getFieldsWithLocationHierarchy() != null && - ancMetadata.getFieldsWithLocationHierarchy().contains(jsonObject.optString(ANCJsonFormUtils.KEY))) { - reverseLocationTree(jsonObject, womanClient.get(jsonObject.optString(ANCJsonFormUtils.KEY))); - } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(DBConstantsUtils.KeyUtils.EDD)) { - formatEdd(womanClient, jsonObject, DBConstantsUtils.KeyUtils.EDD); - - } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.JsonFormKeyUtils.ANC_ID)) { - jsonObject.put(ANCJsonFormUtils.VALUE, womanClient.get(DBConstantsUtils.KeyUtils.ANC_ID).replace("-", "")); - } else if (womanClient.containsKey(jsonObject.getString(ANCJsonFormUtils.KEY))) { - jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); - jsonObject.put(ANCJsonFormUtils.VALUE, womanClient.get(jsonObject.getString(ANCJsonFormUtils.KEY))); - } else { - Timber.e("ERROR:: Unprocessed Form Object Key %s", jsonObject.getString(ANCJsonFormUtils.KEY)); - } - } - - private static void reverseLocationTree(@NonNull JSONObject jsonObject, @Nullable String entity) throws JSONException { - List entityHierarchy = null; - if (entity != null) { - if (ConstantsUtils.OTHER.equalsIgnoreCase(entity)) { - entityHierarchy = new ArrayList<>(); - entityHierarchy.add(entity); - } else { - String locationId = LocationHelper.getInstance().getOpenMrsLocationId(entity); - entityHierarchy = LocationHelper.getInstance().getOpenMrsLocationHierarchy(locationId, false); - } - } - ArrayList allLevels = AncLibrary.getInstance().getAncMetadata().getHealthFacilityLevels(); - List entireTree = LocationHelper.getInstance().generateLocationHierarchyTree(true, allLevels); - String entireTreeString = AssetHandler.javaToJsonString(entireTree, new TypeToken>() { - }.getType()); - String facilityHierarchyString = AssetHandler.javaToJsonString(entityHierarchy, new TypeToken>() { - }.getType()); - if (StringUtils.isNotBlank(facilityHierarchyString)) { - jsonObject.put(JsonFormConstants.VALUE, facilityHierarchyString); - jsonObject.put(JsonFormConstants.TREE, new JSONArray(entireTreeString)); - } - } - - private static void getDobUsingEdd(Map womanClient, JSONObject jsonObject, String birthDate) - throws JSONException { - String dobString = womanClient.get(birthDate); - if (StringUtils.isNotBlank(dobString)) { - Date dob = Utils.dobStringToDate(dobString); - if (dob != null) { - jsonObject.put(ANCJsonFormUtils.VALUE, DATE_FORMAT.format(dob)); - } - } - } - - private static void getPhotoFieldValue(Map womanClient, JSONObject jsonObject) throws JSONException { - Photo photo = ImageUtils.profilePhotoByClientID(womanClient.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID), - Utils.getProfileImageResourceIdentifier()); - - if (photo != null && StringUtils.isNotBlank(photo.getFilePath())) { - jsonObject.put(ANCJsonFormUtils.VALUE, photo.getFilePath()); - - } - } - - private static void formatEdd(Map womanClient, JSONObject jsonObject, String eddDate) - throws JSONException { - String eddString = womanClient.get(eddDate); - if (StringUtils.isNotBlank(eddString)) { - Date edd = Utils.dobStringToDate(eddString); - if (edd != null) { - jsonObject.put(ANCJsonFormUtils.VALUE, EDD_DATE_FORMAT.format(edd)); - } - } - } - - public static void startFormForEdit(Activity context, int jsonFormActivityRequestCode, String metaData) { - Intent intent = new Intent(context, EditJsonFormActivity.class); - intent.putExtra(ConstantsUtils.IntentKeyUtils.JSON, metaData); - intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); - Timber.d("form is %s", metaData); - context.startActivityForResult(intent, jsonFormActivityRequestCode); - } - - public static Triple saveRemovedFromANCRegister(AllSharedPreferences allSharedPreferences, String jsonString, String providerId) { - try { - boolean isDeath = false; - Triple registrationFormParams = validateParameters(jsonString); - - if (!registrationFormParams.getLeft()) { - return null; - } - - JSONObject jsonForm = registrationFormParams.getMiddle(); - JSONArray fields = registrationFormParams.getRight(); - - String encounterType = ANCJsonFormUtils.getString(jsonForm, ENCOUNTER_TYPE); - JSONObject metadata = ANCJsonFormUtils.getJSONObject(jsonForm, METADATA); - - String encounterLocation = null; - - try { - encounterLocation = metadata.getString(ConstantsUtils.JsonFormKeyUtils.ENCOUNTER_LOCATION); - } catch (JSONException e) { - Timber.e(e, "JsonFormUtils --> saveRemovedFromANCRegister --> getEncounterLocation"); - } - - Date encounterDate = new Date(); - String entityId = ANCJsonFormUtils.getString(jsonForm, ANCJsonFormUtils.ENTITY_ID); - - Event event = (Event) new Event().withBaseEntityId(entityId) //should be different for main and subform - .withEventDate(encounterDate).withEventType(encounterType).withLocationId(encounterLocation) - .withProviderId(providerId).withEntityType(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME) - .withFormSubmissionId(ANCJsonFormUtils.generateRandomUUIDString()).withDateCreated(new Date()); - tagSyncMetadata(allSharedPreferences, event); - - for (int i = 0; i < fields.length(); i++) { - JSONObject jsonObject = ANCJsonFormUtils.getJSONObject(fields, i); - - String value = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.VALUE); - if (StringUtils.isNotBlank(value)) { - ANCJsonFormUtils.addObservation(event, jsonObject); - if (jsonObject.get(ANCJsonFormUtils.KEY).equals(ConstantsUtils.JsonFormKeyUtils.ANC_CLOSE_REASON)) { - isDeath = "Woman Died".equalsIgnoreCase(value); - } - } - } - - Iterator keys = metadata.keys(); - - while (keys.hasNext()) { - String key = (String) keys.next(); - JSONObject jsonObject = ANCJsonFormUtils.getJSONObject(metadata, key); - String value = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.VALUE); - if (StringUtils.isNotBlank(value)) { - String entityVal = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.OPENMRS_ENTITY); - if (entityVal != null) { - if (entityVal.equals(ANCJsonFormUtils.CONCEPT)) { - ANCJsonFormUtils.addToJSONObject(jsonObject, ANCJsonFormUtils.KEY, key); - ANCJsonFormUtils.addObservation(event, jsonObject); - - } else if (entityVal.equals(ANCJsonFormUtils.ENCOUNTER)) { - String entityIdVal = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.OPENMRS_ENTITY_ID); - if (entityIdVal.equals(FormEntityConstants.Encounter.encounter_date.name())) { - Date eDate = ANCJsonFormUtils.formatDate(value, false); - if (eDate != null) { - event.setEventDate(eDate); - } - } - } - } - } - } - - //Update Child Entity to include death date - Event updateChildDetailsEvent = - (Event) new Event().withBaseEntityId(entityId) //should be different for main and subform - .withEventDate(encounterDate).withEventType(ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION) - .withLocationId(encounterLocation).withProviderId(providerId) - .withEntityType(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME).withFormSubmissionId(ANCJsonFormUtils.generateRandomUUIDString()) - .withDateCreated(new Date()); - tagSyncMetadata(allSharedPreferences, updateChildDetailsEvent); - - return Triple.of(isDeath, event, updateChildDetailsEvent); - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> saveRemovedFromANCRegister"); - } - return null; - } - - public static void launchANCCloseForm(Activity activity) { - try { - Intent intent = new Intent(activity, FormConfigurationJsonFormActivity.class); - JSONObject form = new com.vijay.jsonwizard.utils.FormUtils().getFormJsonFromRepositoryOrAssets(activity.getApplicationContext(), ConstantsUtils.JsonFormUtils.ANC_CLOSE); - if (form != null) { - form.put(ConstantsUtils.JsonFormKeyUtils.ENTITY_ID, activity.getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID)); - intent.putExtra(ConstantsUtils.IntentKeyUtils.JSON, form.toString()); - intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); - activity.startActivityForResult(intent, ANCJsonFormUtils.REQUEST_CODE_GET_JSON); - } - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> launchANCCloseForm"); - } - } - - public static void launchSiteCharacteristicsForm(Activity activity) { - try { - Intent intent = new Intent(activity, FormConfigurationJsonFormActivity.class); - JSONObject form = new com.vijay.jsonwizard.utils.FormUtils().getFormJsonFromRepositoryOrAssets(activity.getApplicationContext(), ConstantsUtils.JsonFormUtils.ANC_SITE_CHARACTERISTICS); - if (form != null) { - form.put(ConstantsUtils.JsonFormKeyUtils.ENTITY_ID, - activity.getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID)); - intent.putExtra(ConstantsUtils.IntentKeyUtils.JSON, form.toString()); - intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); - activity.startActivityForResult(intent, ANCJsonFormUtils.REQUEST_CODE_GET_JSON); - } - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> launchSiteCharacteristicsForm"); - } - } - - public static Map processSiteCharacteristics(String jsonString) { - try { - Triple registrationFormParams = validateParameters(jsonString); - if (!registrationFormParams.getLeft()) { - return null; - } - - Map settings = new HashMap<>(); - JSONArray fields = - registrationFormParams.getMiddle().getJSONObject(ANCJsonFormUtils.STEP1).getJSONArray(ANCJsonFormUtils.FIELDS); - - for (int i = 0; i < fields.length(); i++) { - if (!"label".equals(fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.TYPE))) { - settings.put(fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.KEY), - StringUtils.isBlank(fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.VALUE)) ? "0" : - fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.VALUE)); - } - } - - return settings; - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> processSiteCharacteristics"); - return null; - } - } - - public static String getAutoPopulatedSiteCharacteristicsEditFormString(Context context, - Map characteristics) { - try { - JSONObject form = FormUtils.getInstance(context).getFormJson(ConstantsUtils.JsonFormUtils.ANC_SITE_CHARACTERISTICS); - Timber.d("Form is %s", form.toString()); - if (form != null) { - form.put(ANCJsonFormUtils.ENCOUNTER_TYPE, ConstantsUtils.EventTypeUtils.SITE_CHARACTERISTICS); - - JSONObject stepOne = form.getJSONObject(ANCJsonFormUtils.STEP1); - JSONArray jsonArray = stepOne.getJSONArray(ANCJsonFormUtils.FIELDS); - for (int i = 0; i < jsonArray.length(); i++) { - JSONObject jsonObject = jsonArray.getJSONObject(i); - if (characteristics.containsKey(jsonObject.getString(ANCJsonFormUtils.KEY))) { - jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); - jsonObject.put(ANCJsonFormUtils.VALUE, - "true".equals(characteristics.get(jsonObject.getString(ANCJsonFormUtils.KEY))) ? "1" : "0"); - } - - } - - return form.toString(); - } - } catch (Exception e) { - Timber.e(e, "JsonFormUtils --> getAutoPopulatedSiteCharacteristicsEditFormString"); - } - - return ""; - } - - public static Pair createVisitAndUpdateEvent(List formSubmissionIDs, - Map womanDetails) { - if (formSubmissionIDs.size() < 1 && womanDetails.get(ConstantsUtils.REFERRAL) == null) { - return null; - } - - try { - String baseEntityId = womanDetails.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID); - - Event contactVisitEvent = Utils.createContactVisitEvent(formSubmissionIDs, womanDetails, String.valueOf(getOpenTasks(baseEntityId))); - - //Update client - EventClientRepository db = AncLibrary.getInstance().getEventClientRepository(); - - JSONObject clientForm = db.getClientByBaseEntityId(baseEntityId); - JSONObject attributes = clientForm.getJSONObject(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES); - attributes.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT, womanDetails.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT)); - attributes.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, womanDetails.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE)); - attributes.put(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, - womanDetails.get(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE)); - attributes.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, womanDetails.get(DBConstantsUtils.KeyUtils.CONTACT_STATUS)); - attributes.put(DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, womanDetails.get(DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT)); - attributes.put(DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, womanDetails.get(DBConstantsUtils.KeyUtils.RED_FLAG_COUNT)); - attributes.put(DBConstantsUtils.KeyUtils.EDD, womanDetails.get(DBConstantsUtils.KeyUtils.EDD)); - attributes.put(DBConstantsUtils.KeyUtils.ALT_NAME, womanDetails.get(DBConstantsUtils.KeyUtils.ALT_NAME)); - attributes.put(DBConstantsUtils.KeyUtils.PHONE_NUMBER, womanDetails.get(DBConstantsUtils.KeyUtils.PHONE_NUMBER)); - attributes.put(DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER, womanDetails.get(DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER)); - clientForm.put(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES, attributes); - - db.addorUpdateClient(baseEntityId, clientForm); - - Event updateClientEvent = createUpdateClientDetailsEvent(baseEntityId); - - return Pair.create(contactVisitEvent, updateClientEvent); - - } catch (Exception e) { - Timber.e(e, " --> createContactVisitEvent"); - return null; - } - - } - - public static Date getContactStartDate(String contactStartDate) { - try { - return new LocalDate(contactStartDate).toDate(); - } catch (Exception e) { - return new LocalDate().toDate(); - } - } - - private static JSONArray getOpenTasks(String baseEntityId) { - List openTasks = AncLibrary.getInstance().getContactTasksRepository().getOpenTasks(baseEntityId); - JSONArray openTaskArray = new JSONArray(); - if (openTasks != null && openTasks.size() > 0) { - for (Task task : openTasks) { - openTaskArray.put(task.getValue()); - } - } - return openTaskArray; - } - - protected static Event createUpdateClientDetailsEvent(String baseEntityId) { - - Event updateChildDetailsEvent = (Event) new Event().withBaseEntityId(baseEntityId).withEventDate(new Date()) - .withEventType(ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION).withEntityType(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME) - .withFormSubmissionId(ANCJsonFormUtils.generateRandomUUIDString()).withDateCreated(new Date()); - - ANCJsonFormUtils - .tagSyncMetadata(AncLibrary.getInstance().getContext().allSharedPreferences(), updateChildDetailsEvent); - - return updateChildDetailsEvent; - } - - public static Event processContactFormEvent(JSONObject jsonForm, String baseEntityId) { - AllSharedPreferences allSharedPreferences = AncLibrary.getInstance().getContext().allSharedPreferences(); - JSONArray fields = getMultiStepFormFields(jsonForm); - - String entityId = getString(jsonForm, ANCJsonFormUtils.ENTITY_ID); - if (StringUtils.isBlank(entityId)) { - entityId = baseEntityId; - } - - String encounterType = getString(jsonForm, ENCOUNTER_TYPE); - JSONObject metadata = getJSONObject(jsonForm, METADATA); - - FormTag formTag = getFormTag(allSharedPreferences); - Event baseEvent = org.smartregister.util.JsonFormUtils - .createEvent(fields, metadata, formTag, entityId, encounterType, DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME); - - tagSyncMetadata(allSharedPreferences, baseEvent);// tag docs - - return baseEvent; - } - - public static JSONObject readJsonFromAsset(Context context, String filePath) throws Exception { - InputStream inputStream = context.getAssets().open(filePath + ".json"); - BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); - String jsonString; - StringBuilder stringBuilder = new StringBuilder(); - while ((jsonString = reader.readLine()) != null) { - stringBuilder.append(jsonString); - } - inputStream.close(); - return new JSONObject(stringBuilder.toString()); - } - - /** - * Gets an expansion panel {@link JSONObject} value then check whether the test/tasks was `ordered` or `not done`. - * If any either of this is selected then we mark it as not complete. - * - * @param field {@link JSONObject} - * @return isComplete {@link Boolean} - */ - public static boolean checkIfTaskIsComplete(JSONObject field) { - boolean isComplete = true; - try { - if (field != null && field.has(JsonFormConstants.VALUE)) { - JSONArray value = field.getJSONArray(JsonFormConstants.VALUE); - if (value.length() > 1) { - JSONObject valueField = value.getJSONObject(0); - if (valueField != null && valueField.has(JsonFormConstants.VALUES)) { - JSONArray values = valueField.getJSONArray(JsonFormConstants.VALUES); - if (values.length() > 0) { - String selectedValue = values.getString(0); - if (selectedValue.contains(JsonFormConstants.AncRadioButtonOptionTypesUtils.ORDERED) || selectedValue.contains(JsonFormConstants.AncRadioButtonOptionTypesUtils.NOT_DONE)) { - isComplete = false; - } - } - } - } - } - } catch (JSONException e) { - Timber.e(e, " --> checkIfTaskIsComplete"); - } - return isComplete; - } - - public List generateNextContactSchedule(String edd, List contactSchedule, - Integer lastContactSequence) { - List contactDates = new ArrayList<>(); - Integer contactSequence = lastContactSequence; - if (StringUtils.isNotBlank(edd)) { - LocalDate localDate = new LocalDate(edd); - LocalDate lmpDate = localDate.minusWeeks(ConstantsUtils.DELIVERY_DATE_WEEKS); - - for (String contactWeeks : contactSchedule) { - contactDates.add(new ContactSummaryModel(String.format( - AncLibrary.getInstance().getContext().getStringResource(R.string.contact_number), - contactSequence++), - Utils.convertDateFormat(lmpDate.plusWeeks(Integer.valueOf(contactWeeks)).toDate(), - Utils.CONTACT_SUMMARY_DF), lmpDate.plusWeeks(Integer.valueOf(contactWeeks)).toDate(), - contactWeeks)); - } - } - return contactDates; - } - - /** - * Creates and populates a constraint view to add the contacts tab view instead of using recycler views which introduce - * lots of scroll complexities - * - * @param data - * @param facts - * @param position - * @param context - * @return constraintLayout - */ - @NonNull - public ConstraintLayout createListViewItems(List data, Facts facts, int position, Context context) { - YamlConfigItem yamlConfigItem = data.get(position).getYamlConfigItem(); - - ANCJsonFormUtils.Template template = getTemplate(yamlConfigItem.getTemplate()); - String output = ""; - if (!TextUtils.isEmpty(template.detail)) { - output = Utils.fillTemplate(template.detail, facts); - } - - LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - ConstraintLayout constraintLayout = - (ConstraintLayout) inflater.inflate(R.layout.previous_contacts_preview_row, null); - TextView sectionDetailTitle = constraintLayout.findViewById(R.id.overview_section_details_left); - TextView sectionDetails = constraintLayout.findViewById(R.id.overview_section_details_right); - - - sectionDetailTitle.setText(template.title); - sectionDetails.setText(output);//Perhaps refactor to use Json Form Parser Implementation - - if (AncLibrary.getInstance().getAncRulesEngineHelper().getRelevance(facts, yamlConfigItem.getIsRedFont())) { - sectionDetailTitle.setTextColor(context.getResources().getColor(R.color.overview_font_red)); - sectionDetails.setTextColor(context.getResources().getColor(R.color.overview_font_red)); - } else { - sectionDetailTitle.setTextColor(context.getResources().getColor(R.color.overview_font_left)); - sectionDetails.setTextColor(context.getResources().getColor(R.color.overview_font_right)); - } - - sectionDetailTitle.setVisibility(View.VISIBLE); - sectionDetails.setVisibility(View.VISIBLE); - return constraintLayout; - } - - public Template getTemplate(String rawTemplate) { - Template template = new Template(); - - if (rawTemplate.contains(":")) { - String[] templateArray = rawTemplate.split(":"); - if (templateArray.length == 1) { - template.title = templateArray[0].trim(); - } else if (templateArray.length > 1) { - template.title = templateArray[0].trim(); - template.detail = templateArray[1].trim(); - } - } else { - template.title = rawTemplate; - template.detail = "Yes"; - } - - return template; - } - - public class Template { - public String title = ""; - public String detail = ""; - } +package org.smartregister.anc.library.util; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.graphics.Bitmap; +import android.text.TextUtils; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.core.util.Pair; + +import com.google.common.reflect.TypeToken; +import com.vijay.jsonwizard.activities.FormConfigurationJsonFormActivity; +import com.vijay.jsonwizard.constants.JsonFormConstants; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Triple; +import org.jeasy.rules.api.Facts; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.joda.time.LocalDate; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.smartregister.anc.library.AncLibrary; +import org.smartregister.anc.library.BuildConfig; +import org.smartregister.anc.library.R; +import org.smartregister.anc.library.activity.EditJsonFormActivity; +import org.smartregister.anc.library.domain.YamlConfigItem; +import org.smartregister.anc.library.domain.YamlConfigWrapper; +import org.smartregister.anc.library.model.ContactSummaryModel; +import org.smartregister.anc.library.model.Task; +import org.smartregister.clientandeventmodel.Client; +import org.smartregister.clientandeventmodel.Event; +import org.smartregister.clientandeventmodel.FormEntityConstants; +import org.smartregister.domain.Photo; +import org.smartregister.domain.ProfileImage; +import org.smartregister.domain.form.FormLocation; +import org.smartregister.domain.tag.FormTag; +import org.smartregister.location.helper.LocationHelper; +import org.smartregister.repository.AllSharedPreferences; +import org.smartregister.repository.EventClientRepository; +import org.smartregister.repository.ImageRepository; +import org.smartregister.util.AssetHandler; +import org.smartregister.util.FormUtils; +import org.smartregister.util.ImageUtils; +import org.smartregister.view.LocationPickerView; +import org.smartregister.view.activity.DrishtiApplication; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import timber.log.Timber; + +/** + * Created by keyman on 27/06/2018. + */ +public class ANCJsonFormUtils extends org.smartregister.util.JsonFormUtils { + public static final String METADATA = "metadata"; + public static final String ENCOUNTER_TYPE = "encounter_type"; + public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd-MM-yyyy"); + public static final SimpleDateFormat EDD_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + public static final String READ_ONLY = "read_only"; + public static final int REQUEST_CODE_GET_JSON = 3432; + private static final String TAG = ANCJsonFormUtils.class.getCanonicalName(); + + public static boolean isFieldRequired(JSONObject fieldObject) throws JSONException { + boolean isValueRequired = false; + if (fieldObject.has(JsonFormConstants.V_REQUIRED)) { + JSONObject valueRequired = fieldObject.getJSONObject(JsonFormConstants.V_REQUIRED); + String value = valueRequired.getString(JsonFormConstants.VALUE); + isValueRequired = Boolean.parseBoolean(value); + } + //Don't check required for hidden, toaster notes, spacer and label widgets + return (!fieldObject.getString(JsonFormConstants.TYPE).equals(JsonFormConstants.LABEL) && + !fieldObject.getString(JsonFormConstants.TYPE).equals(JsonFormConstants.SPACER) && + !fieldObject.getString(JsonFormConstants.TYPE).equals(JsonFormConstants.TOASTER_NOTES) && + !fieldObject.getString(JsonFormConstants.TYPE).equals(JsonFormConstants.HIDDEN)) && + isValueRequired; + } + + public static JSONObject getFormAsJson(JSONObject form, String formName, String id, String currentLocationId) + throws Exception { + if (form == null) { + return null; + } + + String entityId = id; + form.getJSONObject(METADATA).put(ANCJsonFormUtils.ENCOUNTER_LOCATION, currentLocationId); + + if (ConstantsUtils.JsonFormUtils.ANC_REGISTER.equals(formName)) { + if (StringUtils.isNotBlank(entityId)) { + entityId = entityId.replace("-", ""); + } + + addRegistrationLocationHierarchyQuestions(form); + // Inject opensrp id into the form + JSONArray field = ANCJsonFormUtils.fields(form); + JSONObject ancId = getFieldJSONObject(field, ConstantsUtils.JsonFormKeyUtils.ANC_ID); + if (ancId != null) { + ancId.remove(ANCJsonFormUtils.VALUE); + ancId.put(ANCJsonFormUtils.VALUE, entityId); + } + + } else if (ConstantsUtils.JsonFormUtils.ANC_CLOSE.equals(formName)) { + if (StringUtils.isNotBlank(entityId)) { + // Inject entity id into the remove form + form.remove(ANCJsonFormUtils.ENTITY_ID); + form.put(ENTITY_ID, entityId); + } + } else { + Timber.tag(TAG).w("Unsupported form requested for launch %s", formName); + } + Timber.d("form is %s", form.toString()); + return form; + } + + private static void addRegistrationLocationHierarchyQuestions(@NonNull JSONObject form) { + try { + JSONArray fields = com.vijay.jsonwizard.utils.FormUtils.getMultiStepFormFields(form); + AncMetadata metadata = AncLibrary.getInstance().getAncMetadata(); + ArrayList allLevels = metadata.getLocationLevels(); + ArrayList healthFacilities = metadata.getHealthFacilityLevels(); + List defaultLocation = LocationHelper.getInstance().generateDefaultLocationHierarchy(allLevels); + List defaultFacility = LocationHelper.getInstance().generateDefaultLocationHierarchy(healthFacilities); + List entireTree = LocationHelper.getInstance().generateLocationHierarchyTree(true, allLevels); + String defaultLocationString = AssetHandler.javaToJsonString(defaultLocation, new TypeToken>() { + }.getType()); + + String defaultFacilityString = AssetHandler.javaToJsonString(defaultFacility, new TypeToken>() { + }.getType()); + + String entireTreeString = AssetHandler.javaToJsonString(entireTree, new TypeToken>() { + }.getType()); + + updateLocationTree(fields, defaultLocationString, defaultFacilityString, entireTreeString); + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> addRegLocHierarchyQuestions"); + } + } + + private static void updateLocationTree(@NonNull JSONArray fields, + @NonNull String defaultLocationString, + @NonNull String defaultFacilityString, + @NonNull String entireTreeString) { + AncMetadata ancMetadata = AncLibrary.getInstance().getAncMetadata(); + if (ancMetadata.getFieldsWithLocationHierarchy() != null && !ancMetadata.getFieldsWithLocationHierarchy().isEmpty()) { + for (int i = 0; i < fields.length(); i++) { + JSONObject widget = fields.optJSONObject(i); + if (ancMetadata.getFieldsWithLocationHierarchy().contains(widget.optString(JsonFormConstants.KEY))) { + if (StringUtils.isNotBlank(entireTreeString)) { + addLocationTree(widget.optString(JsonFormConstants.KEY), widget, entireTreeString, JsonFormConstants.TREE); + } + if (StringUtils.isNotBlank(defaultFacilityString)) { + addLocationTreeDefault(widget.optString(JsonFormConstants.KEY), widget, defaultLocationString); + } + } + } + } + } + + private static void addLocationTree(@NonNull String widgetKey, @NonNull JSONObject widget, @NonNull String updateString, @NonNull String treeType) { + try { + if (widget.optString(JsonFormConstants.KEY).equals(widgetKey)) { + widget.put(treeType, new JSONArray(updateString)); + } + } catch (JSONException e) { + Timber.e(e, "JsonFormUtils --> addLocationTree"); + } + } + + private static void addLocationTreeDefault(@NonNull String widgetKey, @NonNull JSONObject widget, @NonNull String updateString) { + addLocationTree(widgetKey, widget, updateString, JsonFormConstants.DEFAULT); + } + + public static JSONObject getFieldJSONObject(JSONArray jsonArray, String key) { + if (jsonArray == null || jsonArray.length() == 0) { + return null; + } + + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject jsonObject = ANCJsonFormUtils.getJSONObject(jsonArray, i); + String keyVal = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.KEY); + if (keyVal != null && keyVal.equals(key)) { + return jsonObject; + } + } + return null; + } + + public static Pair processRegistrationForm(AllSharedPreferences allSharedPreferences, String jsonString) { + try { + Triple registrationFormParams = validateParameters(jsonString); + + if (!registrationFormParams.getLeft()) { + return null; + } + + JSONObject jsonForm = registrationFormParams.getMiddle(); + JSONArray fields = registrationFormParams.getRight(); + + String entityId = getEntityId(jsonForm); + String encounterType = ANCJsonFormUtils.getString(jsonForm, ENCOUNTER_TYPE); + JSONObject metadata = ANCJsonFormUtils.getJSONObject(jsonForm, METADATA); + addLastInteractedWith(fields); + getDobStrings(fields); + String previousVisitsMap = initializeFirstContactValues(fields); + processLocationFields(fields); + + FormTag formTag = getFormTag(allSharedPreferences); + + Client baseClient = org.smartregister.util.JsonFormUtils.createBaseClient(fields, formTag, entityId); + Event baseEvent = org.smartregister.util.JsonFormUtils + .createEvent(fields, metadata, formTag, entityId, encounterType, DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME); + + if (previousVisitsMap != null) { + baseEvent.addDetails(ConstantsUtils.JsonFormKeyUtils.PREVIOUS_VISITS_MAP, previousVisitsMap); + } + tagSyncMetadata(allSharedPreferences, baseEvent);// tag docs + + return Pair.create(baseClient, baseEvent); + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> processRegistrationForm"); + return null; + } + } + + protected static void processLocationFields(@NonNull JSONArray fields) throws JSONException { + for (int i = 0; i < fields.length(); i++) { + if (fields.optJSONObject(i).has(JsonFormConstants.TYPE) && + fields.optJSONObject(i).optString(JsonFormConstants.TYPE).equals(JsonFormConstants.TREE)) + try { + String rawValue = fields.optJSONObject(i).optString(JsonFormConstants.VALUE); + if (StringUtils.isNotBlank(rawValue)) { + JSONArray valueArray = new JSONArray(rawValue); + if (valueArray.length() > 0) { + String lastLocationName = valueArray.optString(valueArray.length() - 1); + String lastLocationId = LocationHelper.getInstance().getOpenMrsLocationId(lastLocationName); + fields.optJSONObject(i).put(JsonFormConstants.VALUE, lastLocationId); + } + } + } catch (NullPointerException e) { + Timber.e(e); + } catch (IllegalArgumentException e) { + Timber.e(e); + } + } + } + + public static Triple validateParameters(String jsonString) { + + JSONObject jsonForm = ANCJsonFormUtils.toJSONObject(jsonString); + JSONArray fields = ANCJsonFormUtils.fields(jsonForm); + + return Triple.of(jsonForm != null && fields != null, jsonForm, fields); + } + + @NotNull + private static String getEntityId(JSONObject jsonForm) { + String entityId = ANCJsonFormUtils.getString(jsonForm, ANCJsonFormUtils.ENTITY_ID); + if (StringUtils.isBlank(entityId)) { + entityId = ANCJsonFormUtils.generateRandomUUIDString(); + } + return entityId; + } + + private static void addLastInteractedWith(JSONArray fields) throws JSONException { + JSONObject lastInteractedWith = new JSONObject(); + lastInteractedWith.put(ConstantsUtils.KeyUtils.KEY, DBConstantsUtils.KeyUtils.LAST_INTERACTED_WITH); + lastInteractedWith.put(ConstantsUtils.KeyUtils.VALUE, Calendar.getInstance().getTimeInMillis()); + fields.put(lastInteractedWith); + } + + private static void getDobStrings(JSONArray fields) throws JSONException { + JSONObject dobUnknownObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.DOB_UNKNOWN); + JSONArray options = ANCJsonFormUtils.getJSONArray(dobUnknownObject, ConstantsUtils.JsonFormKeyUtils.OPTIONS); + JSONObject option = ANCJsonFormUtils.getJSONObject(options, 0); + String dobUnKnownString = option != null ? option.getString(ANCJsonFormUtils.VALUE) : null; + + if (StringUtils.isNotBlank(dobUnKnownString)) { + dobUnknownObject.put(ANCJsonFormUtils.VALUE, Boolean.valueOf(dobUnKnownString) ? 1 : 0); + } + } + + /*** + * Initializes the values in the mother details table used by contact containers + * @param fields {@link JSONArray} + * @return + * @throws JSONException + */ + private static String initializeFirstContactValues(@NonNull JSONArray fields) throws JSONException { + String strGroup = null; + + int nextContact = 1; + + String nextContactDate = Utils.convertDateFormat(Calendar.getInstance().getTime(), Utils.DB_DF); + + if (ConstantsUtils.DueCheckStrategy.CHECK_FOR_FIRST_CONTACT.equals(Utils.getDueCheckStrategy())) { + HashMap> previousVisitsMap = Utils.buildRepeatingGroupValues(fields, ConstantsUtils.JsonFormKeyUtils.PREVIOUS_VISITS); + if (!previousVisitsMap.isEmpty()) { + + nextContact = previousVisitsMap.size() + 1; + + strGroup = ANCJsonFormUtils.gson.toJson(previousVisitsMap); + + Set>> previousVisitsMapSet = previousVisitsMap.entrySet(); + + HashMap previousVisitsMapItem = new LinkedHashMap<>(); + + for (Map.Entry> entry : previousVisitsMapSet) { + previousVisitsMapItem = entry.getValue(); + } + + JSONObject lastContactDateJSONObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE); + lastContactDateJSONObject.put(ANCJsonFormUtils.VALUE, previousVisitsMapItem.get(ConstantsUtils.JsonFormKeyUtils.VISIT_DATE)); + } + } + JSONObject nextContactJSONObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.NEXT_CONTACT); + if (nextContactJSONObject.has(JsonFormConstants.VALUE) && + "".equals(nextContactJSONObject.getString(JsonFormConstants.VALUE))) { + nextContactJSONObject.put(ANCJsonFormUtils.VALUE, nextContact); + } + + JSONObject nextContactDateJSONObject = getFieldJSONObject(fields, DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE); + if (nextContactDateJSONObject.has(JsonFormConstants.VALUE) && + "".equals(nextContactDateJSONObject.getString(JsonFormConstants.VALUE))) { + nextContactDateJSONObject.put(ANCJsonFormUtils.VALUE, nextContactDate); + } + + return strGroup; + } + + + @NotNull + public static FormTag getFormTag(AllSharedPreferences allSharedPreferences) { + FormTag formTag = new FormTag(); + formTag.providerId = allSharedPreferences.fetchRegisteredANM(); + formTag.appVersion = BuildConfig.VERSION_CODE; + formTag.databaseVersion = AncLibrary.getInstance().getDatabaseVersion(); + return formTag; + } + + public static void tagSyncMetadata(AllSharedPreferences allSharedPreferences, Event event) { + String providerId = allSharedPreferences.fetchRegisteredANM(); + event.setProviderId(providerId); + event.setLocationId(allSharedPreferences.fetchDefaultLocalityId(providerId)); + event.setChildLocationId(getChildLocationId(event.getLocationId(), allSharedPreferences)); + event.setTeam(allSharedPreferences.fetchDefaultTeam(providerId)); + event.setTeamId(allSharedPreferences.fetchDefaultTeamId(providerId)); + //event.setVersion(BuildConfig.EVENT_VERSION); + event.setClientApplicationVersion(BuildConfig.VERSION_CODE); + event.setClientDatabaseVersion(AncLibrary.getInstance().getDatabaseVersion()); + } + + @Nullable + public static String getChildLocationId(@NonNull String defaultLocationId, @NonNull AllSharedPreferences allSharedPreferences) { + String currentLocality = allSharedPreferences.fetchCurrentLocality(); + + if (StringUtils.isNotBlank(currentLocality)) { + String currentLocalityId = LocationHelper.getInstance().getOpenMrsLocationId(currentLocality); + if (StringUtils.isNotBlank(currentLocalityId) && !defaultLocationId.equals(currentLocalityId)) { + return currentLocalityId; + } + } + + return null; + } + + public static void mergeAndSaveClient(Client baseClient) throws Exception { + JSONObject updatedClientJson = new JSONObject(org.smartregister.util.JsonFormUtils.gson.toJson(baseClient)); + + JSONObject originalClientJsonObject = + AncLibrary.getInstance().getEcSyncHelper().getClient(baseClient.getBaseEntityId()); + + JSONObject mergedJson = org.smartregister.util.JsonFormUtils.merge(originalClientJsonObject, updatedClientJson); + + //TODO Save edit log ? + + AncLibrary.getInstance().getEcSyncHelper().addClient(baseClient.getBaseEntityId(), mergedJson); + } + + public static void saveImage(String providerId, String entityId, String imageLocation) { + OutputStream outputStream = null; + try { + if (StringUtils.isBlank(imageLocation)) { + return; + } + + File file = FileUtil.createFileFromPath(imageLocation); + if (!file.exists()) { + return; + } + + Bitmap compressedBitmap = AncLibrary.getInstance().getCompressor().compressToBitmap(file); + if (compressedBitmap == null || StringUtils.isBlank(providerId) || StringUtils.isBlank(entityId)) { + return; + } + + if (!entityId.isEmpty()) { + final String absoluteFileName = DrishtiApplication.getAppDir() + File.separator + entityId + ".JPEG"; + + File outputFile = FileUtil.createFileFromPath(absoluteFileName); + outputStream = FileUtil.createFileOutputStream(outputFile); + Bitmap.CompressFormat compressFormat = Bitmap.CompressFormat.JPEG; + compressedBitmap.compress(compressFormat, 100, outputStream); + // insert into the db + ProfileImage profileImage = getProfileImage(providerId, entityId, absoluteFileName); + ImageRepository imageRepository = AncLibrary.getInstance().getContext().imageRepository(); + imageRepository.add(profileImage); + } + + } catch (FileNotFoundException e) { + Timber.e("Failed to save static image to disk"); + } catch (IOException e) { + Timber.e(e, " --> saveImage"); + } finally { + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + Timber.e("Failed to close static images output stream after attempting to write image"); + } + } + } + } + + @NotNull + private static ProfileImage getProfileImage(String providerId, String entityId, String absoluteFileName) { + ProfileImage profileImage = new ProfileImage(); + profileImage.setImageid(UUID.randomUUID().toString()); + profileImage.setAnmId(providerId); + profileImage.setEntityID(entityId); + profileImage.setFilepath(absoluteFileName); + profileImage.setFilecategory(ConstantsUtils.FileCategoryUtils.PROFILE_PIC); + profileImage.setSyncStatus(ImageRepository.TYPE_Unsynced); + return profileImage; + } + + public static String getString(String jsonString, String field) { + return ANCJsonFormUtils.getString(ANCJsonFormUtils.toJSONObject(jsonString), field); + } + + public static String getFieldValue(String jsonString, String key) { + JSONObject jsonForm = ANCJsonFormUtils.toJSONObject(jsonString); + if (jsonForm == null) { + return null; + } + + JSONArray fields = ANCJsonFormUtils.fields(jsonForm); + if (fields == null) { + return null; + } + + return ANCJsonFormUtils.getFieldValue(fields, key); + + } + + public static String getAutoPopulatedJsonEditRegisterFormString(Context context, Map womanClient) { + try { + JSONObject form = FormUtils.getInstance(context).getFormJson(ConstantsUtils.JsonFormUtils.ANC_REGISTER); + LocationPickerView lpv = createLocationPickerView(context); + if (lpv != null) { + lpv.init(); + } + + Timber.d("Form is %s", form.toString()); + + if (form != null) { + form.put(ANCJsonFormUtils.ENTITY_ID, womanClient.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID)); + form.put(ANCJsonFormUtils.ENCOUNTER_TYPE, ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION); + + JSONObject metadata = form.getJSONObject(ANCJsonFormUtils.METADATA); + String lastLocationId = + lpv != null ? LocationHelper.getInstance().getOpenMrsLocationId(lpv.getSelectedItem()) : ""; + + metadata.put(ANCJsonFormUtils.ENCOUNTER_LOCATION, lastLocationId); + + form.put(ConstantsUtils.CURRENT_OPENSRP_ID, womanClient.get(DBConstantsUtils.KeyUtils.ANC_ID).replace("-", "")); + + //inject opensrp id into the form + JSONObject stepOne = form.getJSONObject(ANCJsonFormUtils.STEP1); + JSONArray jsonArray = stepOne.getJSONArray(ANCJsonFormUtils.FIELDS); + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + + processPopulatableFields(womanClient, jsonObject); + + } + + return form.toString(); + } + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> getAutoPopulatedJsonEditRegisterFormString"); + } + + return ""; + } + + private static LocationPickerView createLocationPickerView(Context context) { + try { + return new LocationPickerView(context); + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> createLocationPickerView"); + return null; + } + } + + protected static void processPopulatableFields(Map womanClient, JSONObject jsonObject) + throws JSONException { + + AncMetadata ancMetadata = AncLibrary.getInstance().getAncMetadata(); + + if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.JsonFormKeyUtils.DOB_ENTERED)) { + getDobUsingEdd(womanClient, jsonObject, DBConstantsUtils.KeyUtils.DOB); + + } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(DBConstantsUtils.KeyUtils.HOME_ADDRESS)) { + String homeAddress = womanClient.get(DBConstantsUtils.KeyUtils.HOME_ADDRESS); + jsonObject.put(ANCJsonFormUtils.VALUE, homeAddress); + + } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.WOM_IMAGE)) { + getPhotoFieldValue(womanClient, jsonObject); + } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(DBConstantsUtils.KeyUtils.DOB_UNKNOWN)) { + jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); + JSONObject optionsObject = jsonObject.getJSONArray(ConstantsUtils.JsonFormKeyUtils.OPTIONS).getJSONObject(0); + optionsObject.put(ANCJsonFormUtils.VALUE, womanClient.get(DBConstantsUtils.KeyUtils.DOB_UNKNOWN)); + + } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.KeyUtils.AGE_ENTERED)) { + jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); + if (StringUtils.isNotBlank(womanClient.get(DBConstantsUtils.KeyUtils.DOB))) { + jsonObject.put(ANCJsonFormUtils.VALUE, Utils.getAgeFromDate(womanClient.get(DBConstantsUtils.KeyUtils.DOB))); + } + } else if (ancMetadata != null && ancMetadata.getFieldsWithLocationHierarchy() != null && + ancMetadata.getFieldsWithLocationHierarchy().contains(jsonObject.optString(ANCJsonFormUtils.KEY))) { + reverseLocationTree(jsonObject, womanClient.get(jsonObject.optString(ANCJsonFormUtils.KEY))); + } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(DBConstantsUtils.KeyUtils.EDD)) { + formatEdd(womanClient, jsonObject, DBConstantsUtils.KeyUtils.EDD); + + } else if (jsonObject.getString(ANCJsonFormUtils.KEY).equalsIgnoreCase(ConstantsUtils.JsonFormKeyUtils.ANC_ID)) { + jsonObject.put(ANCJsonFormUtils.VALUE, womanClient.get(DBConstantsUtils.KeyUtils.ANC_ID).replace("-", "")); + } else if (womanClient.containsKey(jsonObject.getString(ANCJsonFormUtils.KEY))) { + jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); + jsonObject.put(ANCJsonFormUtils.VALUE, womanClient.get(jsonObject.getString(ANCJsonFormUtils.KEY))); + } else { + Timber.e("ERROR:: Unprocessed Form Object Key %s", jsonObject.getString(ANCJsonFormUtils.KEY)); + } + } + + private static void reverseLocationTree(@NonNull JSONObject jsonObject, @Nullable String entity) throws JSONException { + List entityHierarchy = null; + if (entity != null) { + if (ConstantsUtils.OTHER.equalsIgnoreCase(entity)) { + entityHierarchy = new ArrayList<>(); + entityHierarchy.add(entity); + } else { + String locationId = LocationHelper.getInstance().getOpenMrsLocationId(entity); + entityHierarchy = LocationHelper.getInstance().getOpenMrsLocationHierarchy(locationId, false); + } + } + ArrayList allLevels = AncLibrary.getInstance().getAncMetadata().getHealthFacilityLevels(); + List entireTree = LocationHelper.getInstance().generateLocationHierarchyTree(true, allLevels); + String entireTreeString = AssetHandler.javaToJsonString(entireTree, new TypeToken>() { + }.getType()); + String facilityHierarchyString = AssetHandler.javaToJsonString(entityHierarchy, new TypeToken>() { + }.getType()); + if (StringUtils.isNotBlank(facilityHierarchyString)) { + jsonObject.put(JsonFormConstants.VALUE, facilityHierarchyString); + jsonObject.put(JsonFormConstants.TREE, new JSONArray(entireTreeString)); + } + } + + private static void getDobUsingEdd(Map womanClient, JSONObject jsonObject, String birthDate) + throws JSONException { + String dobString = womanClient.get(birthDate); + if (StringUtils.isNotBlank(dobString)) { + Date dob = Utils.dobStringToDate(dobString); + if (dob != null) { + jsonObject.put(ANCJsonFormUtils.VALUE, DATE_FORMAT.format(dob)); + } + } + } + + private static void getPhotoFieldValue(Map womanClient, JSONObject jsonObject) throws JSONException { + Photo photo = ImageUtils.profilePhotoByClientID(womanClient.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID), + Utils.getProfileImageResourceIdentifier()); + + if (photo != null && StringUtils.isNotBlank(photo.getFilePath())) { + jsonObject.put(ANCJsonFormUtils.VALUE, photo.getFilePath()); + + } + } + + private static void formatEdd(Map womanClient, JSONObject jsonObject, String eddDate) + throws JSONException { + String eddString = womanClient.get(eddDate); + if (StringUtils.isNotBlank(eddString)) { + Date edd = Utils.dobStringToDate(eddString); + if (edd != null) { + jsonObject.put(ANCJsonFormUtils.VALUE, EDD_DATE_FORMAT.format(edd)); + } + } + } + + public static void startFormForEdit(Activity context, int jsonFormActivityRequestCode, String metaData) { + Intent intent = new Intent(context, EditJsonFormActivity.class); + intent.putExtra(ConstantsUtils.IntentKeyUtils.JSON, metaData); + intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); + Timber.d("form is %s", metaData); + context.startActivityForResult(intent, jsonFormActivityRequestCode); + } + + public static Triple saveRemovedFromANCRegister(AllSharedPreferences allSharedPreferences, String jsonString, String providerId) { + try { + boolean isDeath = false; + Triple registrationFormParams = validateParameters(jsonString); + + if (!registrationFormParams.getLeft()) { + return null; + } + + JSONObject jsonForm = registrationFormParams.getMiddle(); + JSONArray fields = registrationFormParams.getRight(); + + String encounterType = ANCJsonFormUtils.getString(jsonForm, ENCOUNTER_TYPE); + JSONObject metadata = ANCJsonFormUtils.getJSONObject(jsonForm, METADATA); + + String encounterLocation = null; + + try { + encounterLocation = metadata.getString(ConstantsUtils.JsonFormKeyUtils.ENCOUNTER_LOCATION); + } catch (JSONException e) { + Timber.e(e, "JsonFormUtils --> saveRemovedFromANCRegister --> getEncounterLocation"); + } + + Date encounterDate = new Date(); + String entityId = ANCJsonFormUtils.getString(jsonForm, ANCJsonFormUtils.ENTITY_ID); + + Event event = (Event) new Event().withBaseEntityId(entityId) //should be different for main and subform + .withEventDate(encounterDate).withEventType(encounterType).withLocationId(encounterLocation) + .withProviderId(providerId).withEntityType(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME) + .withFormSubmissionId(ANCJsonFormUtils.generateRandomUUIDString()).withDateCreated(new Date()); + tagSyncMetadata(allSharedPreferences, event); + + for (int i = 0; i < fields.length(); i++) { + JSONObject jsonObject = ANCJsonFormUtils.getJSONObject(fields, i); + + String value = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.VALUE); + if (StringUtils.isNotBlank(value)) { + ANCJsonFormUtils.addObservation(event, jsonObject); + if (jsonObject.get(ANCJsonFormUtils.KEY).equals(ConstantsUtils.JsonFormKeyUtils.ANC_CLOSE_REASON)) { + isDeath = "Woman Died".equalsIgnoreCase(value); + } + } + } + + Iterator keys = metadata.keys(); + + while (keys.hasNext()) { + String key = (String) keys.next(); + JSONObject jsonObject = ANCJsonFormUtils.getJSONObject(metadata, key); + String value = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.VALUE); + if (StringUtils.isNotBlank(value)) { + String entityVal = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.OPENMRS_ENTITY); + if (entityVal != null) { + if (entityVal.equals(ANCJsonFormUtils.CONCEPT)) { + ANCJsonFormUtils.addToJSONObject(jsonObject, ANCJsonFormUtils.KEY, key); + ANCJsonFormUtils.addObservation(event, jsonObject); + + } else if (entityVal.equals(ANCJsonFormUtils.ENCOUNTER)) { + String entityIdVal = ANCJsonFormUtils.getString(jsonObject, ANCJsonFormUtils.OPENMRS_ENTITY_ID); + if (entityIdVal.equals(FormEntityConstants.Encounter.encounter_date.name())) { + Date eDate = ANCJsonFormUtils.formatDate(value, false); + if (eDate != null) { + event.setEventDate(eDate); + } + } + } + } + } + } + + //Update Child Entity to include death date + Event updateChildDetailsEvent = + (Event) new Event().withBaseEntityId(entityId) //should be different for main and subform + .withEventDate(encounterDate).withEventType(ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION) + .withLocationId(encounterLocation).withProviderId(providerId) + .withEntityType(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME).withFormSubmissionId(ANCJsonFormUtils.generateRandomUUIDString()) + .withDateCreated(new Date()); + tagSyncMetadata(allSharedPreferences, updateChildDetailsEvent); + + return Triple.of(isDeath, event, updateChildDetailsEvent); + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> saveRemovedFromANCRegister"); + } + return null; + } + + public static void launchANCCloseForm(Activity activity) { + try { + Intent intent = new Intent(activity, FormConfigurationJsonFormActivity.class); + JSONObject form = new com.vijay.jsonwizard.utils.FormUtils().getFormJsonFromRepositoryOrAssets(activity.getApplicationContext(), ConstantsUtils.JsonFormUtils.ANC_CLOSE); + if (form != null) { + form.put(ConstantsUtils.JsonFormKeyUtils.ENTITY_ID, activity.getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID)); + intent.putExtra(ConstantsUtils.IntentKeyUtils.JSON, form.toString()); + intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); + activity.startActivityForResult(intent, ANCJsonFormUtils.REQUEST_CODE_GET_JSON); + } + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> launchANCCloseForm"); + } + } + + public static void launchSiteCharacteristicsForm(Activity activity) { + try { + Intent intent = new Intent(activity, FormConfigurationJsonFormActivity.class); + JSONObject form = new com.vijay.jsonwizard.utils.FormUtils().getFormJsonFromRepositoryOrAssets(activity.getApplicationContext(), ConstantsUtils.JsonFormUtils.ANC_SITE_CHARACTERISTICS); + if (form != null) { + form.put(ConstantsUtils.JsonFormKeyUtils.ENTITY_ID, + activity.getIntent().getStringExtra(ConstantsUtils.IntentKeyUtils.BASE_ENTITY_ID)); + intent.putExtra(ConstantsUtils.IntentKeyUtils.JSON, form.toString()); + intent.putExtra(JsonFormConstants.PERFORM_FORM_TRANSLATION, true); + activity.startActivityForResult(intent, ANCJsonFormUtils.REQUEST_CODE_GET_JSON); + } + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> launchSiteCharacteristicsForm"); + } + } + + public static Map processSiteCharacteristics(String jsonString) { + try { + Triple registrationFormParams = validateParameters(jsonString); + if (!registrationFormParams.getLeft()) { + return null; + } + + Map settings = new HashMap<>(); + JSONArray fields = + registrationFormParams.getMiddle().getJSONObject(ANCJsonFormUtils.STEP1).getJSONArray(ANCJsonFormUtils.FIELDS); + + for (int i = 0; i < fields.length(); i++) { + if (!"label".equals(fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.TYPE))) { + settings.put(fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.KEY), + StringUtils.isBlank(fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.VALUE)) ? "0" : + fields.getJSONObject(i).getString(ConstantsUtils.KeyUtils.VALUE)); + } + } + + return settings; + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> processSiteCharacteristics"); + return null; + } + } + + public static String getAutoPopulatedSiteCharacteristicsEditFormString(Context context, + Map characteristics) { + try { + JSONObject form = FormUtils.getInstance(context).getFormJson(ConstantsUtils.JsonFormUtils.ANC_SITE_CHARACTERISTICS); + Timber.d("Form is %s", form.toString()); + if (form != null) { + form.put(ANCJsonFormUtils.ENCOUNTER_TYPE, ConstantsUtils.EventTypeUtils.SITE_CHARACTERISTICS); + + JSONObject stepOne = form.getJSONObject(ANCJsonFormUtils.STEP1); + JSONArray jsonArray = stepOne.getJSONArray(ANCJsonFormUtils.FIELDS); + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + if (characteristics.containsKey(jsonObject.getString(ANCJsonFormUtils.KEY))) { + jsonObject.put(ANCJsonFormUtils.READ_ONLY, false); + jsonObject.put(ANCJsonFormUtils.VALUE, + "true".equals(characteristics.get(jsonObject.getString(ANCJsonFormUtils.KEY))) ? "1" : "0"); + } + + } + + return form.toString(); + } + } catch (Exception e) { + Timber.e(e, "JsonFormUtils --> getAutoPopulatedSiteCharacteristicsEditFormString"); + } + + return ""; + } + + public static Pair createVisitAndUpdateEvent(List formSubmissionIDs, + Map womanDetails) { + if (formSubmissionIDs.size() < 1 && womanDetails.get(ConstantsUtils.REFERRAL) == null) { + return null; + } + + try { + String baseEntityId = womanDetails.get(DBConstantsUtils.KeyUtils.BASE_ENTITY_ID); + + Event contactVisitEvent = Utils.createContactVisitEvent(formSubmissionIDs, womanDetails, String.valueOf(getOpenTasks(baseEntityId))); + + //Update client + EventClientRepository db = AncLibrary.getInstance().getEventClientRepository(); + + JSONObject clientForm = db.getClientByBaseEntityId(baseEntityId); + JSONObject attributes = clientForm.getJSONObject(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES); + attributes.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT, womanDetails.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT)); + attributes.put(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE, womanDetails.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE)); + attributes.put(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE, + womanDetails.get(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE)); + attributes.put(DBConstantsUtils.KeyUtils.CONTACT_STATUS, womanDetails.get(DBConstantsUtils.KeyUtils.CONTACT_STATUS)); + attributes.put(DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT, womanDetails.get(DBConstantsUtils.KeyUtils.YELLOW_FLAG_COUNT)); + attributes.put(DBConstantsUtils.KeyUtils.RED_FLAG_COUNT, womanDetails.get(DBConstantsUtils.KeyUtils.RED_FLAG_COUNT)); + attributes.put(DBConstantsUtils.KeyUtils.EDD, womanDetails.get(DBConstantsUtils.KeyUtils.EDD)); + attributes.put(DBConstantsUtils.KeyUtils.ALT_NAME, womanDetails.get(DBConstantsUtils.KeyUtils.ALT_NAME)); + attributes.put(DBConstantsUtils.KeyUtils.PHONE_NUMBER, womanDetails.get(DBConstantsUtils.KeyUtils.PHONE_NUMBER)); + attributes.put(DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER, womanDetails.get(DBConstantsUtils.KeyUtils.ALT_PHONE_NUMBER)); + clientForm.put(ConstantsUtils.JsonFormKeyUtils.ATTRIBUTES, attributes); + + db.addorUpdateClient(baseEntityId, clientForm); + + Event updateClientEvent = createUpdateClientDetailsEvent(baseEntityId); + + return Pair.create(contactVisitEvent, updateClientEvent); + + } catch (Exception e) { + Timber.e(e, " --> createContactVisitEvent"); + return null; + } + + } + + public static Date getContactStartDate(String contactStartDate) { + try { + return new LocalDate(contactStartDate).toDate(); + } catch (Exception e) { + return new LocalDate().toDate(); + } + } + + private static JSONArray getOpenTasks(String baseEntityId) { + List openTasks = AncLibrary.getInstance().getContactTasksRepository().getOpenTasks(baseEntityId); + JSONArray openTaskArray = new JSONArray(); + if (openTasks != null && openTasks.size() > 0) { + for (Task task : openTasks) { + openTaskArray.put(task.getValue()); + } + } + return openTaskArray; + } + + protected static Event createUpdateClientDetailsEvent(String baseEntityId) { + + Event updateChildDetailsEvent = (Event) new Event().withBaseEntityId(baseEntityId).withEventDate(new Date()) + .withEventType(ConstantsUtils.EventTypeUtils.UPDATE_REGISTRATION).withEntityType(DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME) + .withFormSubmissionId(ANCJsonFormUtils.generateRandomUUIDString()).withDateCreated(new Date()); + + ANCJsonFormUtils + .tagSyncMetadata(AncLibrary.getInstance().getContext().allSharedPreferences(), updateChildDetailsEvent); + + return updateChildDetailsEvent; + } + + public static Event processContactFormEvent(JSONObject jsonForm, String baseEntityId) { + AllSharedPreferences allSharedPreferences = AncLibrary.getInstance().getContext().allSharedPreferences(); + JSONArray fields = getMultiStepFormFields(jsonForm); + + String entityId = getString(jsonForm, ANCJsonFormUtils.ENTITY_ID); + if (StringUtils.isBlank(entityId)) { + entityId = baseEntityId; + } + + String encounterType = getString(jsonForm, ENCOUNTER_TYPE); + JSONObject metadata = getJSONObject(jsonForm, METADATA); + + FormTag formTag = getFormTag(allSharedPreferences); + Event baseEvent = org.smartregister.util.JsonFormUtils + .createEvent(fields, metadata, formTag, entityId, encounterType, DBConstantsUtils.DEMOGRAPHIC_TABLE_NAME); + + tagSyncMetadata(allSharedPreferences, baseEvent);// tag docs + + return baseEvent; + } + + public static JSONObject readJsonFromAsset(Context context, String filePath) throws Exception { + InputStream inputStream = context.getAssets().open(filePath + ".json"); + BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); + String jsonString; + StringBuilder stringBuilder = new StringBuilder(); + while ((jsonString = reader.readLine()) != null) { + stringBuilder.append(jsonString); + } + inputStream.close(); + return new JSONObject(stringBuilder.toString()); + } + + /** + * Gets an expansion panel {@link JSONObject} value then check whether the test/tasks was `ordered` or `not done`. + * If any either of this is selected then we mark it as not complete. + * + * @param field {@link JSONObject} + * @return isComplete {@link Boolean} + */ + public static boolean checkIfTaskIsComplete(JSONObject field) { + boolean isComplete = true; + try { + if (field != null && field.has(JsonFormConstants.VALUE)) { + JSONArray value = field.getJSONArray(JsonFormConstants.VALUE); + if (value.length() > 1) { + JSONObject valueField = value.getJSONObject(0); + if (valueField != null && valueField.has(JsonFormConstants.VALUES)) { + JSONArray values = valueField.getJSONArray(JsonFormConstants.VALUES); + if (values.length() > 0) { + String selectedValue = values.getString(0); + if (selectedValue.contains(JsonFormConstants.AncRadioButtonOptionTypesUtils.ORDERED) || selectedValue.contains(JsonFormConstants.AncRadioButtonOptionTypesUtils.NOT_DONE)) { + isComplete = false; + } + } + } + } + } + } catch (JSONException e) { + Timber.e(e, " --> checkIfTaskIsComplete"); + } + return isComplete; + } + + public List generateNextContactSchedule(String edd, List contactSchedule, + Integer lastContactSequence) { + List contactDates = new ArrayList<>(); + Integer contactSequence = lastContactSequence; + if (StringUtils.isNotBlank(edd)) { + LocalDate localDate = new LocalDate(edd); + LocalDate lmpDate = localDate.minusWeeks(ConstantsUtils.DELIVERY_DATE_WEEKS); + + for (String contactWeeks : contactSchedule) { + contactDates.add(new ContactSummaryModel(String.format( + AncLibrary.getInstance().getContext().getStringResource(R.string.contact_number), + contactSequence++), + Utils.convertDateFormat(lmpDate.plusWeeks(Integer.valueOf(contactWeeks)).toDate(), + Utils.CONTACT_SUMMARY_DF), lmpDate.plusWeeks(Integer.valueOf(contactWeeks)).toDate(), + contactWeeks)); + } + } + return contactDates; + } + + /** + * Creates and populates a constraint view to add the contacts tab view instead of using recycler views which introduce + * lots of scroll complexities + * + * @param data + * @param facts + * @param position + * @param context + * @return constraintLayout + */ + @NonNull + public ConstraintLayout createListViewItems(List data, Facts facts, int position, Context context) { + YamlConfigItem yamlConfigItem = data.get(position).getYamlConfigItem(); + + ANCJsonFormUtils.Template template = getTemplate(yamlConfigItem.getTemplate()); + String output = ""; + if (!TextUtils.isEmpty(template.detail)) { + output = Utils.fillTemplate(template.detail, facts); + } + + LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + ConstraintLayout constraintLayout = + (ConstraintLayout) inflater.inflate(R.layout.previous_contacts_preview_row, null); + TextView sectionDetailTitle = constraintLayout.findViewById(R.id.overview_section_details_left); + TextView sectionDetails = constraintLayout.findViewById(R.id.overview_section_details_right); + + + sectionDetailTitle.setText(template.title); + sectionDetails.setText(output);//Perhaps refactor to use Json Form Parser Implementation + + if (AncLibrary.getInstance().getAncRulesEngineHelper().getRelevance(facts, yamlConfigItem.getIsRedFont())) { + sectionDetailTitle.setTextColor(context.getResources().getColor(R.color.overview_font_red)); + sectionDetails.setTextColor(context.getResources().getColor(R.color.overview_font_red)); + } else { + sectionDetailTitle.setTextColor(context.getResources().getColor(R.color.overview_font_left)); + sectionDetails.setTextColor(context.getResources().getColor(R.color.overview_font_right)); + } + + sectionDetailTitle.setVisibility(View.VISIBLE); + sectionDetails.setVisibility(View.VISIBLE); + return constraintLayout; + } + + public Template getTemplate(String rawTemplate) { + Template template = new Template(); + + if (rawTemplate.contains(":")) { + String[] templateArray = rawTemplate.split(":"); + if (templateArray.length == 1) { + template.title = templateArray[0].trim(); + } else if (templateArray.length > 1) { + template.title = templateArray[0].trim(); + template.detail = templateArray[1].trim(); + } + } else { + template.title = rawTemplate; + template.detail = "Yes"; + } + + return template; + } + + public class Template { + public String title = ""; + public String detail = ""; + } + + public static JSONObject populateSecondaryValues(String secondaryValue , JSONObject optionsObject) + { + JSONObject secondaryValueObject = new JSONObject(); + JSONArray secondaryValueArray = new JSONArray(); + try { + secondaryValueArray.put(secondaryValue); + secondaryValueObject.put(JsonFormConstants.KEY, optionsObject.getString(JsonFormConstants.KEY)); + secondaryValueObject.put(JsonFormConstants.VALUES, secondaryValueArray); + secondaryValueObject.put(JsonFormConstants.TYPE, optionsObject.getString(JsonFormConstants.CONTENT_WIDGET)); + } + catch (JSONException e) + { + Timber.e(e); + } + return secondaryValueObject; + + } } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ConstantsUtils.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ConstantsUtils.java index 3af337039..80c784b31 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ConstantsUtils.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/ConstantsUtils.java @@ -131,7 +131,7 @@ public static class JsonFormUtils { public static final String ANC_SITE_CHARACTERISTICS = "anc_site_characteristics"; public static final String ANC_QUICK_CHECK = "anc_quick_check"; public static final String ANC_TEST_TASKS = "anc_test_tasks"; - public static final String ANC_TEST_TASKS_ENCOUNTER_TYPE = "Contact Tasks"; + public static final String ANC_TEST_TASKS_ENCOUNTER_TYPE = "anc_test_tasks"; } public static class JsonFormKeyUtils { diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/DBConstantsUtils.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/DBConstantsUtils.java index ff3303532..d38114f4d 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/DBConstantsUtils.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/DBConstantsUtils.java @@ -4,46 +4,59 @@ * Created by ndegwamartin on 30/06/2018. */ public class DBConstantsUtils { - public static final String CONTACT_ENTITY_TYPE = "contact"; - public static final String DEMOGRAPHIC_TABLE_NAME = "ec_client"; - public static final String WOMAN_DETAILS_TABLE_NAME = "ec_mother_details"; + public static final String CONTACT_ENTITY_TYPE = "contact"; + public static final String DEMOGRAPHIC_TABLE_NAME = "ec_client"; + public static final String WOMAN_DETAILS_TABLE_NAME = "ec_mother_details"; - public interface RegisterTable { - String DEMOGRAPHIC = "ec_client"; - String DETAILS = "ec_mother_details"; - } + public interface RegisterTable { + String DEMOGRAPHIC = "ec_client"; + String DETAILS = "ec_mother_details"; + } - public static final class KeyUtils { - public static final String ID = "_ID"; - public static final String ID_LOWER_CASE = "_id"; - public static final String STEPNAME = "stepName"; - public static final String NUMBER_PICKER = "number_picker"; - public static final String FIRST_NAME = "first_name"; - public static final String LAST_NAME = "last_name"; - public static final String BASE_ENTITY_ID = "base_entity_id"; - public static final String DOB = "dob";//Date Of Birth - public static final String DOB_UNKNOWN = "dob_unknown"; - public static final String EDD = "edd"; - public static final String GENDER = "gender"; - public static final String ANC_ID = "register_id"; - public static final String LAST_INTERACTED_WITH = "last_interacted_with"; - public static final String DATE_REMOVED = "date_removed"; - public static final String PHONE_NUMBER = "phone_number"; - public static final String ALT_NAME = "alt_name"; - public static final String ALT_PHONE_NUMBER = "alt_phone_number"; - public static final String HOME_ADDRESS = "home_address"; - public static final String AGE = "age"; - public static final String REMINDERS = "reminders"; - public static final String RED_FLAG_COUNT = "red_flag_count"; - public static final String YELLOW_FLAG_COUNT = "yellow_flag_count"; - public static final String CONTACT_STATUS = "contact_status"; - public static final String PREVIOUS_CONTACT_STATUS = "previous_contact_status"; - public static final String NEXT_CONTACT = "next_contact"; - public static final String NEXT_CONTACT_DATE = "next_contact_date"; - public static final String LAST_CONTACT_RECORD_DATE = "last_contact_record_date"; - public static final String RELATIONAL_ID = "relationalid"; - public static final String VISIT_START_DATE = "visit_start_date"; - public static final String IS_FIRST_VISIT = "is_first_visit"; - public static final String COHABITANTS = "cohabitants"; - } + public static final class KeyUtils { + + // Base WHO ANC fields + public static final String ID = "_ID"; + public static final String ID_LOWER_CASE = "_id"; + public static final String STEPNAME = "stepName"; + public static final String NUMBER_PICKER = "number_picker"; + public static final String FIRST_NAME = "first_name"; + public static final String LAST_NAME = "last_name"; + public static final String BASE_ENTITY_ID = "base_entity_id"; + public static final String DOB = "dob";//Date Of Birth + public static final String DOB_UNKNOWN = "dob_unknown"; + public static final String EDD = "edd"; + public static final String GENDER = "gender"; + public static final String ANC_ID = "register_id"; + public static final String LAST_INTERACTED_WITH = "last_interacted_with"; + public static final String DATE_REMOVED = "date_removed"; + public static final String PHONE_NUMBER = "phone_number"; + public static final String ALT_NAME = "alt_name"; + public static final String ALT_PHONE_NUMBER = "alt_phone_number"; + public static final String HOME_ADDRESS = "home_address"; + public static final String AGE = "age"; + public static final String REMINDERS = "reminders"; + public static final String RED_FLAG_COUNT = "red_flag_count"; + public static final String YELLOW_FLAG_COUNT = "yellow_flag_count"; + public static final String CONTACT_STATUS = "contact_status"; + public static final String PREVIOUS_CONTACT_STATUS = "previous_contact_status"; + public static final String NEXT_CONTACT = "next_contact"; + public static final String NEXT_CONTACT_DATE = "next_contact_date"; + public static final String LAST_CONTACT_RECORD_DATE = "last_contact_record_date"; + public static final String RELATIONAL_ID = "relationalid"; + public static final String VISIT_START_DATE = "visit_start_date"; + public static final String IS_FIRST_VISIT = "is_first_visit"; + public static final String COHABITANTS = "cohabitants"; + + // Additional fields for local requirements + public static final String UID = "uid"; + public static final String SSN = "ssn"; + public static final String SSN_STATUS = "ssn_status"; + public static final String UID_UNKNOWN = "uid_unknown"; + public static final String UID_UNKNOWN_REASON = "uid_unknown_reason"; + public static final String PHONE_NUMBER_UNKNOWN = "phone_number_unknown"; + public static final String PHONE_NUMBER_UNKNOWN_REASON = "phone_number_unknown_reason"; + public static final String LAST_VISIT_DATE = "last_visit_date"; + + } } diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/Utils.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/Utils.java index b60836396..a8dc2bbdf 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/util/Utils.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/util/Utils.java @@ -5,12 +5,14 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; +import android.content.res.ColorStateList; import android.content.res.Resources; import android.database.Cursor; import android.os.Environment; import android.preference.PreferenceManager; import android.text.TextUtils; import android.text.format.DateUtils; +import android.util.Log; import android.util.TypedValue; import android.view.View; import android.widget.Button; @@ -20,6 +22,8 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import com.google.gson.Gson; +import com.google.gson.JsonParser; import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.layout.Document; @@ -38,7 +42,11 @@ import org.greenrobot.eventbus.EventBus; import org.jeasy.rules.api.Facts; import org.jetbrains.annotations.NotNull; +import org.joda.time.Days; +import org.joda.time.Duration; +import org.joda.time.Interval; import org.joda.time.LocalDate; +import org.joda.time.LocalDateTime; import org.joda.time.Weeks; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; @@ -89,6 +97,7 @@ import java.util.Map; import timber.log.Timber; +import java.time.temporal.ChronoUnit; /** * Created by ndegwamartin on 14/03/2018. @@ -416,21 +425,123 @@ public static String getDBDateToday() { return (new LocalDate()).toString(SQLITE_DATE_DF); } + public static String getClientLastVisitDate(String entityId) { + try { + JSONObject client = AncLibrary.getInstance().getEventClientRepository().getEventsByBaseEntityId(entityId); + JSONArray events = client.getJSONArray("events"); + ArrayList visitDates = new ArrayList(); + for (int i = 0; i < events.length(); i++) { + JSONObject event = events.getJSONObject(i); + String eventType = event.getString("eventType"); + if (eventType.equals("anc_quick_check")) { + JSONArray obs = event.getJSONArray("obs"); + for (int j = 0; j < obs.length(); j++) { + JSONObject field = obs.getJSONObject(j); + String fieldCode = field.getString("fieldCode"); + if (fieldCode.equals("visit_date")) { + JSONArray values = field.getJSONArray("values"); + String visitDate = values.getString(0); + if (visitDate != null) { + visitDates.add(visitDate); + } + } + } + } + } + if (visitDates.size() == 0) return null; + String visitDate = visitDates.get(visitDates.size()-1); + String day = visitDate.substring(0,2); + String month = visitDate.substring(3,5); + String year = visitDate.substring(6,10); + return year + "-" + month + "-" + day; + } catch (JSONException e) { + return null; + } + } + + public static Boolean isVisitDateValid(String entityId, String date) { + Boolean isAlreadyExisted = false; + try { + JSONObject client = AncLibrary.getInstance().getEventClientRepository().getEventsByBaseEntityId(entityId); + JSONArray events = client.getJSONArray("events"); + ArrayList visitDates = new ArrayList(); + for (int i = 0; i < events.length(); i++) { + JSONObject event = events.getJSONObject(i); + String eventType = event.getString("eventType"); + if (eventType.equals("anc_quick_check")) { + JSONArray obs = event.getJSONArray("obs"); + for (int j = 0; j < obs.length(); j++) { + JSONObject field = obs.getJSONObject(j); + String fieldCode = field.getString("fieldCode"); + if (fieldCode.equals("visit_date")) { + JSONArray values = field.getJSONArray("values"); + String visitDate = values.getString(0); + if (visitDate != null) { + String day = visitDate.substring(0,2); + String month = visitDate.substring(3,5); + String year = visitDate.substring(6,10); + String visitDateString = year + "-" + month + "-" + day; + if (visitDateString.equals(date)) isAlreadyExisted = true; + } + } + } + } + } + return isAlreadyExisted; + } catch (JSONException e) { + return false; + } + } + + public static String getActualEDD(String edd, String recordDate, String visitDate) { + try { + LocalDateTime date_edd = LocalDateTime.parse(edd); + LocalDateTime date_record = LocalDateTime.parse(recordDate); + LocalDateTime date_visit = LocalDateTime.parse(visitDate); + Days interval = Days.daysBetween(date_visit, date_record); + LocalDateTime date_actual = date_edd.minusDays(interval.getDays()); + DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd"); + return formatter.print(date_actual); + } catch (Exception e) { + return null; + } + } + + public static int getLastContactGA(String edd, String lastVisit) { + try { + if (!"0".equals(edd) && edd.length() > 0) { + LocalDate date = SQLITE_DATE_DF.withOffsetParsed().parseLocalDate(edd); + LocalDate lmpDate = date.minusWeeks(ConstantsUtils.DELIVERY_DATE_WEEKS); + LocalDate visitDate = SQLITE_DATE_DF.withOffsetParsed().parseLocalDate(lastVisit); + Weeks weeks = Weeks.weeksBetween(lmpDate, visitDate); + return weeks.getWeeks(); + } else { + return 0; + } + } catch (Exception e) { + return 0; + } + } + public static ButtonAlertStatus getButtonAlertStatus (Map details, Context context, boolean isProfile) { String contactStatus = details.get(DBConstantsUtils.KeyUtils.CONTACT_STATUS); + // Encounter date + String visitDate = getClientLastVisitDate(details.get("base_entity_id")); + String lastVisitDate = details.get(DBConstantsUtils.KeyUtils.LAST_VISIT_DATE); + String lastContactRecordDate = details.get(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE); + String nextContactDate = details.get(DBConstantsUtils.KeyUtils.NEXT_CONTACT_DATE); String edd = details.get(DBConstantsUtils.KeyUtils.EDD); + String alertStatus; Integer gestationAge = 0; - if (StringUtils.isNotBlank(edd)) { - gestationAge = Utils.getGestationAgeFromEDDate(edd); + if (StringUtils.isNotBlank(edd) && StringUtils.isNotBlank((contactStatus))) { + gestationAge = Utils.getGAFromEDDateOnVisitDate(edd, lastVisitDate != null ? lastVisitDate : visitDate); AlertRule alertRule = new AlertRule(gestationAge, nextContactDate); - alertStatus = - StringUtils.isNotBlank(contactStatus) && ConstantsUtils.AlertStatusUtils.ACTIVE.equals(contactStatus) ? - ConstantsUtils.AlertStatusUtils.IN_PROGRESS : AncLibrary.getInstance().getAncRulesEngineHelper() - .getButtonAlertStatus(alertRule, ConstantsUtils.RulesFileUtils.ALERT_RULES); + if (contactStatus.equals(ConstantsUtils.AlertStatusUtils.ACTIVE)) alertStatus = ConstantsUtils.AlertStatusUtils.IN_PROGRESS; + else alertStatus = AncLibrary.getInstance().getAncRulesEngineHelper().getButtonAlertStatus(alertRule, ConstantsUtils.RulesFileUtils.ALERT_RULES); } else { alertStatus = StringUtils.isNotBlank(contactStatus) ? ConstantsUtils.AlertStatusUtils.IN_PROGRESS : "DEAD"; } @@ -447,8 +558,11 @@ public static String getDBDateToday() { buttonAlertStatus.buttonText = String.format(getDisplayTemplate(context, alertStatus, isProfile), nextContact, (nextContactDate != null ? nextContactDate : Utils.convertDateFormat(Calendar.getInstance().getTime(), Utils.CONTACT_DF))); - alertStatus = - Utils.processContactDoneToday(details.get(DBConstantsUtils.KeyUtils.LAST_CONTACT_RECORD_DATE), alertStatus); + if (visitDate != null) { + alertStatus = Utils.processContactDoneToday(visitDate, alertStatus); + } else { + alertStatus = Utils.processContactDoneToday(lastContactRecordDate, alertStatus); + } buttonAlertStatus.buttonAlertStatus = alertStatus; buttonAlertStatus.gestationAge = gestationAge; @@ -474,6 +588,23 @@ public static int getGestationAgeFromEDDate(String expectedDeliveryDate) { } } + public static int getGAFromEDDateOnVisitDate(String expectedDeliveryDate, String visitDate) { + try { + if (!"0".equals(expectedDeliveryDate) && expectedDeliveryDate.length() > 0) { + LocalDate date = SQLITE_DATE_DF.withOffsetParsed().parseLocalDate(expectedDeliveryDate); + LocalDate visitDateLocal = SQLITE_DATE_DF.withOffsetParsed().parseLocalDate(visitDate); + LocalDate lmpDate = date.minusWeeks(ConstantsUtils.DELIVERY_DATE_WEEKS); + Weeks weeks = Weeks.weeksBetween(lmpDate, visitDateLocal); + return weeks.getWeeks(); + } else { + return 0; + } + } catch (IllegalArgumentException e) { + Timber.e(e, " --> getGestationAgeFromEDDate"); + return 0; + } + } + public static String reverseHyphenSeperatedValues(String rawString, String outputSeparator) { if (StringUtils.isNotBlank(rawString)) { String resultString = rawString; @@ -535,9 +666,8 @@ public static void processButtonAlertStatus(Context context, Button Utils.processButtonAlertStatus(context, dueButton, null, buttonAlertStatus); } - public static void processButtonAlertStatus(Context context, Button dueButton, TextView - contactTextView, - ButtonAlertStatus buttonAlertStatus) { + public static void processButtonAlertStatus(Context context, Button dueButton, TextView contactTextView, ButtonAlertStatus buttonAlertStatus) { + if (dueButton != null) { dueButton.setVisibility(View.VISIBLE); dueButton.setText(buttonAlertStatus.buttonText); @@ -546,46 +676,35 @@ public static void processButtonAlertStatus(Context context, Button dueButton, T if (buttonAlertStatus.buttonAlertStatus != null) { switch (buttonAlertStatus.buttonAlertStatus) { case ConstantsUtils.AlertStatusUtils.IN_PROGRESS: - dueButton.setBackgroundColor(context.getResources().getColor(R.color.progress_orange)); + dueButton.setBackgroundTintList(ColorStateList.valueOf(context.getResources().getColor(R.color.progress_orange))); dueButton.setTextColor(context.getResources().getColor(R.color.white)); break; case ConstantsUtils.AlertStatusUtils.DUE: - dueButton.setBackground(context.getResources().getDrawable(R.drawable.contact_due)); - dueButton.setTextColor(context.getResources().getColor(R.color.vaccine_blue_bg_st)); + dueButton.setBackgroundTintList(ColorStateList.valueOf(context.getResources().getColor(R.color.vaccine_blue_bg_st))); + dueButton.setTextColor(context.getResources().getColor(R.color.white)); break; case ConstantsUtils.AlertStatusUtils.OVERDUE: - dueButton.setBackgroundColor(context.getResources().getColor(R.color.vaccine_red_bg_st)); + dueButton.setBackgroundTintList(ColorStateList.valueOf(context.getResources().getColor(R.color.vaccine_red_bg_st))); dueButton.setTextColor(context.getResources().getColor(R.color.white)); break; - case ConstantsUtils.AlertStatusUtils.NOT_DUE: - dueButton.setBackground(context.getResources().getDrawable(R.drawable.contact_not_due)); - dueButton.setTextColor(context.getResources().getColor(R.color.dark_grey)); - break; case ConstantsUtils.AlertStatusUtils.DELIVERY_DUE: - dueButton.setBackground(context.getResources().getDrawable(R.drawable.contact_due)); - dueButton.setTextColor(context.getResources().getColor(R.color.vaccine_blue_bg_st)); + dueButton.setBackgroundTintList(ColorStateList.valueOf(context.getResources().getColor(R.color.vaccine_red_bg_st))); + dueButton.setTextColor(context.getResources().getColor(R.color.white)); dueButton.setText(context.getString(R.string.due_delivery)); break; case ConstantsUtils.AlertStatusUtils.EXPIRED: - dueButton.setBackgroundColor(context.getResources().getColor(R.color.vaccine_red_bg_st)); + dueButton.setBackgroundTintList(ColorStateList.valueOf(context.getResources().getColor(R.color.vaccine_red_bg_st))); dueButton.setTextColor(context.getResources().getColor(R.color.white)); dueButton.setText(context.getString(R.string.due_delivery)); break; case ConstantsUtils.AlertStatusUtils.TODAY: - if (contactTextView != null) { - contactTextView.setText(String.format(context.getString(R.string.contact_recorded_today), - Utils.getTodayContact(String.valueOf(buttonAlertStatus.nextContact)))); - contactTextView.setPadding(2, 2, 2, 2); - } - dueButton.setBackground(context.getResources().getDrawable(R.drawable.contact_disabled)); - dueButton.setBackground(context.getResources().getDrawable(R.drawable.contact_disabled)); - dueButton.setTextColor(context.getResources().getColor(R.color.dark_grey)); - dueButton.setText(String.format(context.getString(R.string.contact_recorded_today_no_break), - Utils.getTodayContact(String.valueOf(buttonAlertStatus.nextContact)))); + dueButton.setBackgroundTintList(ColorStateList.valueOf(context.getResources().getColor(R.color.alert_complete_green))); + dueButton.setTextColor(context.getResources().getColor(R.color.white)); + dueButton.setText(String.format(context.getString(R.string.contact_recorded_today_no_break), Utils.getTodayContact(String.valueOf(buttonAlertStatus.nextContact)))); break; default: - dueButton.setBackground(context.getResources().getDrawable(R.drawable.contact_due)); - dueButton.setTextColor(context.getResources().getColor(R.color.vaccine_blue_bg_st)); + dueButton.setBackgroundTintList(ColorStateList.valueOf(context.getResources().getColor(R.color.vaccine_blue_bg_st))); + dueButton.setTextColor(context.getResources().getColor(R.color.white)); break; } @@ -917,15 +1036,15 @@ public static boolean checkJsonArrayString(String input) { return jsonArray.optJSONObject(0) != null || jsonArray.optJSONObject(0).length() > 0; } return false; - } catch (Exception e) { + Timber.e(e); return false; } } /** - * @param receives iterated keys and values and passes them through translation in nativeform + * @param Receives iterated keys and values and passes them through translation in nativeform * to return a string. It checks whether the value is an array, a json object or a normal string separated by , * @return */ @@ -967,13 +1086,59 @@ public static String returnTranslatedStringJoinedValue(String value) { return NativeFormLangUtils.translateDatabaseString(value.trim(), AncLibrary.getInstance().getApplicationContext()); } return value; - } catch (Exception e) { e.printStackTrace(); Timber.e("Failed to translate String %s", e.toString()); return ""; } + } + public static String getFactInputValue(String input) { + try { + if (StringUtils.isNotBlank(input) && input.startsWith("[")) { + if (Utils.checkJsonArrayString(input)) { + JSONArray jsonArray = new JSONArray(input); + List valueList = new ArrayList<>(); + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject object = jsonArray.optJSONObject(i); + String value = object.optString(JsonFormConstants.VALUE).trim(); + valueList.add(value); + } + return valueList.size() > 1 ? String.join(",", valueList) : valueList.size() == 1 ? valueList.get(0) : ""; + } else { + return input.substring(1, input.length() - 1); + } + } + if (StringUtils.isNotBlank(input) && input.startsWith("{")) { + JSONObject attentionFlagObject = new JSONObject(input); + String value = attentionFlagObject.optString(JsonFormConstants.VALUE).trim(); + return value; + } + if (StringUtils.isNotBlank(input) && input.contains(",") && input.contains(".") && input.contains(JsonFormConstants.VALUE)) { + List attentionFlagValueArray = Arrays.asList(input.trim().split(",")); + List valueList = new ArrayList<>(); + for (int i = 0; i < attentionFlagValueArray.size(); i++) { + String value = attentionFlagValueArray.get(i).trim(); + valueList.add(value); + } + return valueList.size() > 1 ? String.join(",", valueList) : valueList.size() == 1 ? valueList.get(0) : ""; + } + if (StringUtils.isNotBlank(input) && input.contains(".") && !input.contains(",") && input.charAt(0) != '[' && !input.contains("{") && input.contains(JsonFormConstants.TEXT)) { + if (input.contains("not_done")) return "not_done"; + else if (input.contains("done")) return "done"; + else if (input.contains("yes")) return "yes"; + else if (input.contains("no")) return "no"; + else if (input.contains(".text")) { + String[] fragments = input.split("."); + return fragments[fragments.length - 2]; + } + } + return input; + } catch (Exception e) { + e.printStackTrace(); + Timber.e("Failed to translate String %s", e.toString()); + return ""; + } } @@ -1163,4 +1328,23 @@ public static String getLocationLocalizedName(Location location, JsonFormActivit } return locationName; } + + public static String extractValuefromJSONObject(String jsonString) + { + if(jsonString == null) + return ""; + if(jsonString.startsWith("{") && jsonString.endsWith("}")) { + try { + + JSONObject valueObject = new JSONObject(jsonString); + return valueObject.getString(ConstantsUtils.KeyUtils.VALUE); + } + catch (JSONException e) + { + Timber.e(e); + return ""; + } + } + return jsonString; + } } \ No newline at end of file diff --git a/opensrp-anc/src/main/java/org/smartregister/anc/library/widget/ANCSpinnerFactory.java b/opensrp-anc/src/main/java/org/smartregister/anc/library/widget/ANCSpinnerFactory.java index 54b853513..7c98c0b15 100644 --- a/opensrp-anc/src/main/java/org/smartregister/anc/library/widget/ANCSpinnerFactory.java +++ b/opensrp-anc/src/main/java/org/smartregister/anc/library/widget/ANCSpinnerFactory.java @@ -134,8 +134,12 @@ protected void populateDescendants(JSONObject jsonObject) { try { JSONObject parentField = JsonFormUtils.getFieldJSONObject(getFormStep().getJSONArray(FIELDS), parents.get(jsonObject.getString(KEY))); - String parentId = parentField.getString(VALUE); - + String parentId = ""; + if (!StringUtils.isNotBlank(parentField.optString(VALUE)) && parentField.optString(VALUE).charAt(0) == '{') { + parentId = new JSONObject(parentField.optString(VALUE)).optString(VALUE); + } else { + parentId = parentField.getString(VALUE); + } populateLocationSpinner(jsonObject, parentId, jsonObject.getString(KEY), descendants.get(jsonObject.getString(KEY))); } catch (JSONException e) { Timber.e(e); diff --git a/opensrp-anc/src/main/res/drawable-hdpi/ic_launcher.png b/opensrp-anc/src/main/res/drawable-hdpi/ic_launcher.png deleted file mode 100755 index 4bc4d0ba3..000000000 Binary files a/opensrp-anc/src/main/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-anc/src/main/res/drawable-mdpi/ic_launcher.png b/opensrp-anc/src/main/res/drawable-mdpi/ic_launcher.png deleted file mode 100755 index dc930107b..000000000 Binary files a/opensrp-anc/src/main/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-anc/src/main/res/drawable-v24/ic_launcher_foreground.xml b/opensrp-anc/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index c7bd21dbd..000000000 --- a/opensrp-anc/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/opensrp-anc/src/main/res/drawable-xhdpi/ic_launcher.png b/opensrp-anc/src/main/res/drawable-xhdpi/ic_launcher.png deleted file mode 100755 index f4b88c5ea..000000000 Binary files a/opensrp-anc/src/main/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-anc/src/main/res/drawable-xxhdpi/ic_launcher.png b/opensrp-anc/src/main/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100755 index 4c4321cc6..000000000 Binary files a/opensrp-anc/src/main/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-anc/src/main/res/drawable-xxxhdpi/ic_launcher.png b/opensrp-anc/src/main/res/drawable-xxxhdpi/ic_launcher.png deleted file mode 100755 index 428a8f0ba..000000000 Binary files a/opensrp-anc/src/main/res/drawable-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-anc/src/main/res/drawable/ic_launcher.png b/opensrp-anc/src/main/res/drawable/ic_launcher.png deleted file mode 100755 index 428a8f0ba..000000000 Binary files a/opensrp-anc/src/main/res/drawable/ic_launcher.png and /dev/null differ diff --git a/opensrp-anc/src/main/res/drawable/ic_launcher_background.xml b/opensrp-anc/src/main/res/drawable/ic_launcher_background.xml index d5fccc538..c78dab63b 100644 --- a/opensrp-anc/src/main/res/drawable/ic_launcher_background.xml +++ b/opensrp-anc/src/main/res/drawable/ic_launcher_background.xml @@ -1,170 +1,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:viewportWidth="108" + android:viewportHeight="108"> + + + + + + + + + \ No newline at end of file diff --git a/opensrp-anc/src/main/res/drawable/ic_launcher_foreground.xml b/opensrp-anc/src/main/res/drawable/ic_launcher_foreground.xml index c7bd21dbd..51a289bb2 100644 --- a/opensrp-anc/src/main/res/drawable/ic_launcher_foreground.xml +++ b/opensrp-anc/src/main/res/drawable/ic_launcher_foreground.xml @@ -1,34 +1,63 @@ - - - - - - - - - + android:viewportWidth="108" + android:viewportHeight="108"> + + + + + + + + + + + + + + + + + + + diff --git a/opensrp-anc/src/main/res/drawable/logo_lombok_barat.png b/opensrp-anc/src/main/res/drawable/logo_lombok_barat.png new file mode 100644 index 000000000..b8389397e Binary files /dev/null and b/opensrp-anc/src/main/res/drawable/logo_lombok_barat.png differ diff --git a/opensrp-anc/src/main/res/drawable/logo_lombok_timur.png b/opensrp-anc/src/main/res/drawable/logo_lombok_timur.png new file mode 100644 index 000000000..e7925db7d Binary files /dev/null and b/opensrp-anc/src/main/res/drawable/logo_lombok_timur.png differ diff --git a/opensrp-anc/src/main/res/drawable/sid_logo.xml b/opensrp-anc/src/main/res/drawable/sid_logo.xml new file mode 100644 index 000000000..3cd276d7c --- /dev/null +++ b/opensrp-anc/src/main/res/drawable/sid_logo.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/opensrp-anc/src/main/res/layout/activity_base_profile.xml b/opensrp-anc/src/main/res/layout/activity_base_profile.xml index 671f8e0be..eeb1d657f 100644 --- a/opensrp-anc/src/main/res/layout/activity_base_profile.xml +++ b/opensrp-anc/src/main/res/layout/activity_base_profile.xml @@ -78,30 +78,39 @@ android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textColor="@color/white" /> - + android:layout_gravity="center" + android:gravity="center" + android:paddingStart="20dp" + android:textAppearance="@style/TextAppearance.AppCompat.Small" + android:textColor="@color/white" /> - + android:gravity="center_horizontal" + android:paddingStart="20dp" + android:text="UK" + android:textAppearance="@style/TextAppearance.AppCompat.Small" + android:textColor="@color/white" /> + + @@ -171,7 +192,6 @@ android:textAlignment="center" /> - > + android:background="@color/login_bg" + android:paddingLeft="40dp" + android:paddingTop="40dp" + android:paddingRight="40dp" + android:paddingBottom="20dp"> @@ -20,52 +24,40 @@ android:id="@+id/top_section" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentTop="true" - android:orientation="vertical" - android:paddingTop="@dimen/login_logo_top_padding"> + android:orientation="vertical"> + + android:layout_height="52dp" + app:srcCompat="@drawable/sid_logo" /> - - + android:paddingLeft="40dp" + android:paddingRight="40dp" + android:text="@string/app_tagline" + android:textColor="@color/login_text" + android:textSize="16sp" + android:textStyle="bold" /> @@ -75,124 +67,144 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/top_section" - android:layout_marginTop="@dimen/login_middle_section_padding_top" - android:orientation="vertical" - android:paddingLeft="@dimen/login_horizontal_margin" - android:paddingRight="@dimen/login_horizontal_margin"> + android:layout_marginTop="42dp" + android:orientation="vertical"> - + android:layout_marginTop="16dp" + android:gravity="end" + android:orientation="horizontal"> + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_alignParentEnd="false" /> - + android:textColor="@color/login_text" + android:textSize="16sp" /> + + +