Sha256: 8b4467b8f5bc10699b17304656d388f1a465fe0a419d45214e9d258e4698e751

Contents?: true

Size: 578 Bytes

Versions: 18

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/research"

module Renalware
  module Research
    class StudyParticipant < ApplicationRecord
      include Accountable
      acts_as_paranoid
      validates :participant_id, presence: true, uniqueness: { scope: :study }
      validates :study, presence: true
      belongs_to :study, touch: true
      belongs_to :patient,
                 class_name: "Renalware::Patient",
                 foreign_key: :participant_id,
                 touch: true

      def to_s
        patient&.to_s
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
renalware-core-2.0.28 app/models/renalware/research/study_participant.rb
renalware-core-2.0.27 app/models/renalware/research/study_participant.rb
renalware-core-2.0.26 app/models/renalware/research/study_participant.rb
renalware-core-2.0.25 app/models/renalware/research/study_participant.rb
renalware-core-2.0.24 app/models/renalware/research/study_participant.rb
renalware-core-2.0.23 app/models/renalware/research/study_participant.rb
renalware-core-2.0.22 app/models/renalware/research/study_participant.rb
renalware-core-2.0.21 app/models/renalware/research/study_participant.rb
renalware-core-2.0.20 app/models/renalware/research/study_participant.rb
renalware-core-2.0.18 app/models/renalware/research/study_participant.rb
renalware-core-2.0.17 app/models/renalware/research/study_participant.rb
renalware-core-2.0.16 app/models/renalware/research/study_participant.rb
renalware-core-2.0.15 app/models/renalware/research/study_participant.rb
renalware-core-2.0.14 app/models/renalware/research/study_participant.rb
renalware-core-2.0.13 app/models/renalware/research/study_participant.rb
renalware-core-2.0.12 app/models/renalware/research/study_participant.rb
renalware-core-2.0.11 app/models/renalware/research/study_participant.rb
renalware-core-2.0.9 app/models/renalware/research/study_participant.rb