Sha256: ca30fd617d125bb9750cf1e93b6ed98912997961be18a8b49e0fe75dfb61b957

Contents?: true

Size: 870 Bytes

Versions: 13

Compression:

Stored size: 870 Bytes

Contents

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
      belongs_to :patient, class_name: "Renalware::Patient", foreign_key: :participant_id

      def to_s
        patient&.to_s
      end
    end
  end
end
#       include Accountable
#       acts_as_paranoid

#       validates :code, presence: true
#       validates :description, presence: true
#       validates :started_on, timeliness: { type: :date, allow_blank: true }
#       validates :terminated_on, timeliness: { type: :date, allow_blank: true, after: :started_on }

#       scope :ordered, -> { order(created_at: :asc) }
#     end
#   end
# end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc10 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc9 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc8 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc7 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc6 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc5 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc4 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc3 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.rc1 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.beta12 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.beta11 app/models/renalware/research/study_participant.rb
renalware-core-2.0.0.pre.beta10 app/models/renalware/research/study_participant.rb