Sha256: c11aab7705ed7c479b5db5260c0a147ea2df94bb96bdd98b50748e4267a1c4a4

Contents?: true

Size: 548 Bytes

Versions: 15

Compression:

Stored size: 548 Bytes

Contents

require_dependency "renalware/admissions"

module Renalware
  module Admissions
    class Request < ApplicationRecord
      include Accountable
      extend Enumerize

      acts_as_paranoid

      belongs_to :patient
      belongs_to :reason, class_name: "RequestReason"

      validates :patient_id, presence: true, uniqueness: true
      validates :reason_id, presence: true
      validates :priority, presence: true

      enumerize :priority, in: %i(low medium high urgent)

      scope :ordered, ->{ order(position: :asc) }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc10 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc9 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc8 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc7 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc6 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc5 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc4 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc3 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.rc1 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.beta12 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.beta11 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.beta10 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.beta9 app/models/renalware/admissions/request.rb
renalware-core-2.0.0.pre.beta8 app/models/renalware/admissions/request.rb