Sha256: e8cb53abc15e0ad47d612fa6138f58de15cbb42b5bd2b5dbeb0e53d717c0130f

Contents?: true

Size: 560 Bytes

Versions: 35

Compression:

Stored size: 560 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/patients"

module Renalware
  module Patients
    class Practice < ApplicationRecord
      acts_as_paranoid

      has_one :address, as: :addressable
      has_many :practice_memberships, dependent: :restrict_with_exception
      has_many :primary_care_physicians, through: :practice_memberships

      accepts_nested_attributes_for :address, allow_destroy: true

      validates :name, presence: true
      validates :address, presence: true
      validates :code, presence: true
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
renalware-core-2.0.78 app/models/renalware/patients/practice.rb
renalware-core-2.0.77 app/models/renalware/patients/practice.rb
renalware-core-2.0.76 app/models/renalware/patients/practice.rb
renalware-core-2.0.75 app/models/renalware/patients/practice.rb
renalware-core-2.0.74 app/models/renalware/patients/practice.rb
renalware-core-2.0.73 app/models/renalware/patients/practice.rb
renalware-core-2.0.72 app/models/renalware/patients/practice.rb
renalware-core-2.0.71 app/models/renalware/patients/practice.rb
renalware-core-2.0.70 app/models/renalware/patients/practice.rb
renalware-core-2.0.69 app/models/renalware/patients/practice.rb
renalware-core-2.0.68 app/models/renalware/patients/practice.rb
renalware-core-2.0.67 app/models/renalware/patients/practice.rb
renalware-core-2.0.64 app/models/renalware/patients/practice.rb
renalware-core-2.0.63 app/models/renalware/patients/practice.rb
renalware-core-2.0.62 app/models/renalware/patients/practice.rb
renalware-core-2.0.61 app/models/renalware/patients/practice.rb
renalware-core-2.0.60 app/models/renalware/patients/practice.rb
renalware-core-2.0.58 app/models/renalware/patients/practice.rb
renalware-core-2.0.57 app/models/renalware/patients/practice.rb
renalware-core-2.0.56 app/models/renalware/patients/practice.rb