Sha256: 168cad0fc8c66001371de99d1ded8fd7f6390ac3e787664f90515d23c03b23b5

Contents?: true

Size: 572 Bytes

Versions: 44

Compression:

Stored size: 572 Bytes

Contents

module ThinkFeelDoEngine
  module Reports
    # Collect metadata for all Participant Thoughts.
    class PatientThought
      def self.columns
        %w( participant_id content created_at )
      end

      def self.all
        Participant.select(:id, :study_id).map.map do |participant|
          participant.thoughts.map do |thought|
            {
              participant_id: participant.study_id,
              content: thought.content,
              created_at: thought.created_at.iso8601
            }
          end
        end.flatten
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
think_feel_do_engine-3.17.2 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.17.1 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.17.0 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.16.3 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.16.2 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.16.1 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.7 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.16.0 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.6 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.5 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.4 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.3 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.2 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.1 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.15.0 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.14.9 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.14.8 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.14.7 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.14.6 app/models/think_feel_do_engine/reports/patient_thought.rb
think_feel_do_engine-3.14.5 app/models/think_feel_do_engine/reports/patient_thought.rb