Sha256: a0c3e367e4793c87197c83a0ef33b697ae19c0dc97f6331d3b38ad2a1ac4ca2d
Contents?: true
Size: 684 Bytes
Versions: 9
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/renal" module Renalware module Renal class AKIAlert < ApplicationRecord include Accountable include PatientsRansackHelper scope :ordered, ->{ order(created_at: :desc) } belongs_to :patient, class_name: "Renal::Patient", touch: true belongs_to :action, class_name: "Renal::AKIAlertAction" belongs_to :hospital_ward, class_name: "Hospitals::Ward" validates :patient, presence: true validates :max_aki, inclusion: 1..3, allow_nil: true alias_attribute :decided_by, :updated_by scope :today, ->{ where(created_at: Time.zone.today.all_day) } end end end
Version data entries
9 entries across 9 versions & 1 rubygems