Sha256: f2f2fba0d94628764fba967b3eb06f3c70a7fc1ecb00d3de50810c15042cb926
Contents?: true
Size: 749 Bytes
Versions: 8
Compression:
Stored size: 749 Bytes
Contents
module Renalware module DrugsHelper def drug_select_options options_for_select Drugs::Type.all .reject{ |r| r.name == "Peritonitis" } .map { |dt| [dt.name, dt.name.downcase] } end def drug_types_colour_tag(drug_types) drug_names = drug_types.map(&:name) return "esa" if drug_names.include?("ESA") return "immunosuppressant" if drug_names.include?("Immunosuppressant") "other" end def drug_types_tag(drug_type) if drug_type.map(&:name).include?("ESA") "ESA" elsif drug_type.map(&:name).include?("Immunosuppressant") "Immunosuppressant" else "Standard" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems