Sha256: 580d1e28902f7146978defbef44f625d98574ab86f7feb2dc91a5f87f436b9d4
Contents?: true
Size: 710 Bytes
Versions: 28
Compression:
Stored size: 710 Bytes
Contents
require_dependency "renalware/pathology" module Renalware module Pathology module Requests class GlobalRule class PatientIsDiabetic < GlobalRule validates :param_comparison_value, inclusion: { in: %w(true false), allow_nil: false } def observation_required_for_patient?(patient, _date) patient.diabetic? == param_comparison_boolean end def to_s if param_comparison_boolean "patient is DM" else "patient is not DM" end end def param_comparison_boolean param_comparison_value == "true" end end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems