OpenSRP/opensrp-client-anc

View on GitHub
opensrp-anc/src/main/assets/rule/tests_expansion_panel_relevance_rules.yml

Summary

Maintainability
Test Coverage
---
name: step1_accordion_hiv
description: HIV test
priority: 1
condition: "(global_pop_hiv_generalized == true || global_pop_hiv_generalized == true && (global_health_conditions.isEmpty() || !global_health_conditions.contains('hiv'))) && (global_contact_no == 1 || (global_contact_no  > 1 && (global_gest_age_openmrs != '' && global_gest_age_openmrs == 29)) || ((global_previous_hiv_test_status == '' || global_previous_hiv_test_status == 'ordered' || global_previous_hiv_test_status == 'not_done') && global_contact_no  > 1 && (global_gest_age_openmrs != '' && global_gest_age_openmrs > 29)))"
actions:
  - "isRelevant = true"
---
name: step2_accordion_hiv
description: HIV test
priority: 1
condition: "global_contact_no > 1 && global_previous_hiv_test_result != '' && (global_previous_hiv_test_result == 'negative' || global_previous_hiv_test_result == 'inconclusive') && (global_gest_age_openmrs != '' && global_gest_age_openmrs != 29) "
actions:
  - "isRelevant = true"
---
name: step1_accordion_hepatitis_b
description: Hepatitis B test
priority: 1
condition: "global_pop_hepb == true || global_pop_hepb_screening == true || (global_alcohol_substance_use != null && global_alcohol_substance_use.isEmpty() && global_alcohol_substance_use.contains('injectable_drugs')) || (global_occupation != null && global_occupation.isEmpty() && global_occupation.contains('informal_employment_sex_worker')) && (global_contact_no == 1 || (global_contact_no > 1 && (global_previous_hepb_test_status == '' || global_previous_hepb_test_status == 'ordered' || global_previous_hepb_test_status == 'not_done')))"
actions:
  - "isRelevant = true"
---
name: step2_accordion_hepatitis_b
description: Hepatitis B test
priority: 1
condition: "global_contact_no > 1 && (global_previous_hepb_test_status != '' && (global_previous_hepb_test_status == 'done_earlier' || global_previous_hepb_test_status == 'done_today')) && global_previous_hepb_positive == '0'"
actions:
  - "isRelevant = true"
---
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')"
actions:
  - "isRelevant = true"
---
name: step2_accordion_hepatitis_c
description: Hepatitis C test
priority: 1
condition: "(global_contact_no > 1 && (global_previous_hepc_test_status == 'done_today' || global_previous_hepc_test_status == 'done_earlier') && global_previous_hepc_positive == '0')"
actions:
  - "isRelevant = true"
---
name: step1_accordion_syphilis
description: syph_test_status
priority: 1
condition: "(global_previous_syphilis_positive == 0 || global_previous_syphilis_positive == '') && (global_contact_no == 1 || (global_contact_no > 1 && (global_gest_age_openmrs != '' && global_gest_age_openmrs == 29)) || ((global_previous_syph_test_status == '' || global_previous_syph_test_status == 'ordered' || global_previous_syph_test_status == 'not_done') && global_contact_no  > 1 && (global_gest_age_openmrs != '' && global_gest_age_openmrs < 29)))"
actions:
  - "isRelevant = true"
---
name: step2_accordion_syphilis
description: syph_test_status
priority: 1
condition: "(global_gest_age_openmrs != '' && global_gest_age_openmrs != 29) && (global_contact_no > 1 && (global_previous_syph_test_status != '' && global_previous_syphilis_positive != '' && global_previous_syphilis_positive == 0))"
actions:
  - "isRelevant = true"
---
name: step1_accordion_urine
description: urine accordion
priority: 1
condition: "global_contact_no == 1  || ((global_contact_no > 1 || (global_gest_age_openmrs != '' && (global_gest_age_openmrs > 26  || global_gest_age_openmrs > 34))) && (global_previous_urine_test_status == '' || global_previous_urine_test_status == 'ordered' || global_previous_urine_test_status == 'not_done')) || (global_gest_age_openmrs != '' && (global_gest_age_openmrs == 26  || global_gest_age_openmrs == 34)) || (!global_other_sym_lbpp.isEmpty() && global_other_sym_lbpp.contains('dysuria'))"
actions:
  - "isRelevant = true"
---
name: step2_accordion_urine
description: urine accordion
priority: 1
condition: "global_contact_no > 1  && (global_previous_urine_test_status != '' && (global_previous_urine_test_status == 'done_earlier' || global_previous_urine_test_status == 'done_today'))"
actions:
  - "isRelevant = true"
---
name: step1_accordion_tb_screening
description: tb_screening_status
priority: 1
condition: "(helper.getValueFromAccordion('accordion_hiv', 'step1_hiv_positive') == '1' || global_pop_tb == true) && (global_contact_no == 1 || (global_contact_no > 1 && (global_previous_tb_screening_status == '' || global_previous_tb_screening_status == 'ordered' || global_previous_tb_screening_status == 'not_done')))"
actions:
  - "isRelevant = true"
---
name: step2_accordion_tb_screening
description: tb_screening_status
priority: 1
condition: "(global_contact_no > 1 && (global_previous_tb_screening_status != '' && (global_previous_tb_screening_status == 'done_earlier' || global_previous_tb_screening_status == 'done_today')))"
actions:
  - "isRelevant = true"
---
name: step1_accordion_ultrasound
description: ultrasound accordion
priority: 1
condition: "((global_contact_no == 1 ) || (global_contact_no > 1 && (global_previous_ultrasound == '' || global_previous_ultrasound == 'not_done' || global_previous_ultrasound == 'ordered'))) && global_gest_age_openmrs != '' && global_gest_age_openmrs < 24"
actions:
  - "isRelevant = true"
---
name: step2_accordion_ultrasound
description: ultrasound accordion
priority: 1
condition: "(global_gest_age_openmrs != '' && global_gest_age_openmrs >= 24 && global_contact_no == 1) || (global_contact_no > 1 && (global_previous_ultrasound != '' && (global_previous_ultrasound == 'done_earlier' || global_previous_ultrasound == 'done_today'))) "
actions:
  - "isRelevant = true"
---
name: step2_accordion_partner_hiv
description: Partner HIV test
priority: 1
condition: "global_partner_hiv_status.contains('dont_know') || global_partner_hiv_status == ''"
actions:
  - "isRelevant = true"
---
name: step1_accordion_blood_type
description: step1 blood type accordion
priority: 1
condition: "global_contact_no == 1 || (global_contact_no > 1 && (global_previous_blood_type_test_status == '' || global_previous_blood_type_test_status == 'ordered' || global_previous_blood_type_test_status == 'not_done'))"
actions:
  - "isRelevant = true"
---

name: step2_accordion_blood_type
description: step2 blood type accordion
priority: 1
condition: "(global_contact_no > 1 && (global_previous_blood_type_test_status == 'done_earlier' || global_previous_blood_type_test_status == 'done_today'))"
actions:
  - "isRelevant = true"
---
name: step1_accordion_blood_haemoglobin
description: hb_test_status
priority: 1
condition: "global_contact_no == 1  || ((global_contact_no > 1 || (global_gest_age_openmrs != '' && (global_gest_age_openmrs > 26  || global_gest_age_openmrs > 36)) )  && (global_previous_hb_test_status == '' || global_previous_hb_test_status == 'ordered' || global_previous_hb_test_status == 'not_done')) || (global_gest_age_openmrs != '' && (global_gest_age_openmrs == 26  || global_gest_age_openmrs == 36))"
actions:
  - "isRelevant = true"
---
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"