app/helpers/hbvs_helper.rb
#if vaccine is needed but not get it, return alert
if vaccine is needed but not get it, return alert
if vaccine is needed but not get it return alert
def determine_hav_vaccine_alert(vaccines, test_status)
    @had_hav_vac = false
    vaccines.each do |v|
      @had_hav_vac = true if v.targetcon == "hav"
    end
    if !@had_hav_vac   
      if(test_status == TEST_STATUS_INFECTED_CHRONIC)
        return "You should get HAV vaccine!"
      end
    end
  end
def determine_hav_vaccine_alert ( vaccines , test_status ) @had_hav_vac = false vaccines . each do | v | @had_hav_vac = true if v . targetcon == "hav" end if ! @had_hav_vac if ( test_status == TEST_STATUS_INFECTED_CHRONIC ) return "You should get HAV vaccine!" end end end
if vaccine is needed but not get it, return alert
if vaccine is needed but not get it return alert
# did not have hav vaccine
vaccines
<not_specific>
test_status
<not_specific>