Sha256: 876e2ca259ea7805873154641b0589ffd31f3dc85657ce9eb9e098249fedf074

Contents?: true

Size: 435 Bytes

Versions: 20

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/renal"

module Renalware
  module Renal
    class Patient < ActiveType::Record[Renalware::Patient]
      has_one :profile
      scope :having_no_primary_renal_diagnosis, lambda {
        where(renal_profile: nil)
      }
      scope :with_profile, lambda {
        joins("LEFT OUTER JOIN renal_profiles ON renal_profiles.patient_id = patients.id")
      }
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
renalware-core-2.0.37 app/models/renalware/renal/patient.rb
renalware-core-2.0.36 app/models/renalware/renal/patient.rb
renalware-core-2.0.35 app/models/renalware/renal/patient.rb
renalware-core-2.0.34 app/models/renalware/renal/patient.rb
renalware-core-2.0.33 app/models/renalware/renal/patient.rb
renalware-core-2.0.32 app/models/renalware/renal/patient.rb
renalware-core-2.0.31 app/models/renalware/renal/patient.rb
renalware-core-2.0.30 app/models/renalware/renal/patient.rb
renalware-core-2.0.28 app/models/renalware/renal/patient.rb
renalware-core-2.0.27 app/models/renalware/renal/patient.rb
renalware-core-2.0.26 app/models/renalware/renal/patient.rb
renalware-core-2.0.25 app/models/renalware/renal/patient.rb
renalware-core-2.0.24 app/models/renalware/renal/patient.rb
renalware-core-2.0.23 app/models/renalware/renal/patient.rb
renalware-core-2.0.22 app/models/renalware/renal/patient.rb
renalware-core-2.0.21 app/models/renalware/renal/patient.rb
renalware-core-2.0.20 app/models/renalware/renal/patient.rb
renalware-core-2.0.18 app/models/renalware/renal/patient.rb
renalware-core-2.0.17 app/models/renalware/renal/patient.rb
renalware-core-2.0.16 app/models/renalware/renal/patient.rb