Sha256: 6cca2ae73b4cd77915c09b18a248c37f1d9748616af49b2bf3f67d85c168a689

Contents?: true

Size: 488 Bytes

Versions: 28

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/letters"

module Renalware
  module Letters
    class PrimaryCarePhysician < ActiveType::Record[Renalware::Patients::PrimaryCarePhysician]
      has_many :patients
      has_many :letters, through: :patients

      def cc_on_letter?(letter)
        return false unless letter.patient.assigned_to_primary_care_physician?(self)
        letter.main_recipient.patient? || letter.main_recipient.contact?
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
renalware-core-2.0.39 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.38 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.37 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.36 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.35 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.34 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.33 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.32 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.31 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.30 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.28 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.27 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.26 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.25 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.24 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.23 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.22 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.21 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.20 app/models/renalware/letters/primary_care_physician.rb
renalware-core-2.0.18 app/models/renalware/letters/primary_care_physician.rb