Sha256: ea36f6672ba6b9f24df81e0788ffcb3b2ac5255a41c008577f5734c6528dc2c7

Contents?: true

Size: 600 Bytes

Versions: 11

Compression:

Stored size: 600 Bytes

Contents

module ThinkFeelDoEngine
  module Reports
    # Collect metadata for each Participant Activity.
    class PatientActivity
      def self.columns
        %w( participant_id activity_title created_at )
      end

      def self.all
        Participant.not_moderator.select(:id, :study_id).map do |participant|
          participant.activities.map do |activity|
            {
              participant_id: participant.study_id,
              activity_title: activity.title,
              created_at: activity.created_at.iso8601
            }
          end
        end.flatten
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
think_feel_do_engine-3.19.9 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.8 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.7 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.6 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.5 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.4 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.3 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.2 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.1 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.19.0 app/models/think_feel_do_engine/reports/patient_activity.rb
think_feel_do_engine-3.18.0 app/models/think_feel_do_engine/reports/patient_activity.rb