Sha256: a03f1e4d25fd4a0ffc4796913968b00c25550f1d13e6a51180a42771d0aa882a

Contents?: true

Size: 536 Bytes

Versions: 86

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/patients"

module Renalware
  module Patients
    class Practice < ApplicationRecord
      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

86 entries across 86 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/models/renalware/patients/practice.rb
renalware-core-2.1.0 app/models/renalware/patients/practice.rb
renalware-core-2.0.167 app/models/renalware/patients/practice.rb
renalware-core-2.0.166 app/models/renalware/patients/practice.rb
renalware-core-2.0.165 app/models/renalware/patients/practice.rb
renalware-core-2.0.164 app/models/renalware/patients/practice.rb
renalware-core-2.0.163 app/models/renalware/patients/practice.rb
renalware-core-2.0.162 app/models/renalware/patients/practice.rb
renalware-core-2.0.161 app/models/renalware/patients/practice.rb
renalware-core-2.0.160 app/models/renalware/patients/practice.rb
renalware-core-2.0.159 app/models/renalware/patients/practice.rb
renalware-core-2.0.158 app/models/renalware/patients/practice.rb
renalware-core-2.0.157 app/models/renalware/patients/practice.rb
renalware-core-2.0.156 app/models/renalware/patients/practice.rb
renalware-core-2.0.155 app/models/renalware/patients/practice.rb
renalware-core-2.0.153 app/models/renalware/patients/practice.rb
renalware-core-2.0.152 app/models/renalware/patients/practice.rb
renalware-core-2.0.151 app/models/renalware/patients/practice.rb
renalware-core-2.0.149 app/models/renalware/patients/practice.rb
renalware-core-2.0.148 app/models/renalware/patients/practice.rb