app/helpers/hbvs_helper.rb
def determine_hbv_treatment_alert(eqcondition, test_status)
    if(eqcondition.eqtreatments.length == 0)  #no test done
      if(test_status == TEST_STATUS_INFECTED_CHRONIC )  #may need treatment
         return "You should check if early treatment is needed now!"
      end
    end
  end
#if treatment is needed but not get it, return alert
if treatment is needed but not get it, return alert
if treatment is needed but not get it return alert
def determine_hbv_treatment_alert(eqcondition, test_status)
    if(eqcondition.eqtreatments.length == 0)  
      if(test_status == TEST_STATUS_INFECTED_CHRONIC )  
         return "You should check if early treatment is needed now!"
      end
    end
  end
def determine_hbv_treatment_alert ( eqcondition , test_status ) if ( eqcondition . eqtreatments . length == 0 ) if ( test_status == TEST_STATUS_INFECTED_CHRONIC ) return "You should check if early treatment is needed now!" end end end
if treatment is needed but not get it, return alert
if treatment is needed but not get it return alert
#no test done #may need treatment
eqcondition
test_status