think_feel_do_engine 3.22.1 → 3.22.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9226f60443fffcf77453879ba71a2e9a86d2a63c
4
- data.tar.gz: 51638e452bdde31e2231c839b0da49bc1f4797da
3
+ metadata.gz: 3aa2a878a30d337e8fd22ee814574dfc725b5006
4
+ data.tar.gz: 6f5f24ee50fb06d34a17f91c9ce2153c584e2b0c
5
5
  SHA512:
6
- metadata.gz: 9b27db1d3da8fbd403d1c574c3d1c39dd61e96244b7a96c9feafd7791021f9ad8ccffe58f443f0058d3cf7361910725cfa67155ab1ec2383bc21521c0466617f
7
- data.tar.gz: 332db4b947789f9b5eb5e3a69cce66725a1893d66eecf6ca48dd3b95cdc273c072ed8b73313c190d2f8bcf5610ef69e10988ce936884a441cd3d7f1c7409caf2
6
+ metadata.gz: f39199f43e878cf2617871e3e42dd7cde00d4f558f67a1647006361bcd1f0782e13a79ae302205c432be5207fb225399cad4f1697a0473e2a15e5a17b54b19cf
7
+ data.tar.gz: 88e2318d37a91db31f485c1c7a28c35a66350fad3380a91c6b8c61ce071b65d570af540e4d1b083bb1be79be4b32cae1ebe84647e16fe4bddb79cff8b2724f15
@@ -4,7 +4,7 @@ module ThinkFeelDoEngine
4
4
  # Collect metadata for all Participant Emotional Ratings.
5
5
  class EmotionalRating
6
6
  def self.columns
7
- %w( participant_id name rating created_at )
7
+ %w( participant_id name rating created_at is_positive )
8
8
  end
9
9
 
10
10
  def self.all
@@ -14,7 +14,8 @@ module ThinkFeelDoEngine
14
14
  participant_id: participant.study_id,
15
15
  name: emotional_rating.name,
16
16
  rating: emotional_rating.rating,
17
- created_at: emotional_rating.created_at.iso8601
17
+ created_at: emotional_rating.created_at.iso8601,
18
+ is_positive: emotional_rating.is_positive
18
19
  }
19
20
  end
20
21
  end.flatten
@@ -8,8 +8,8 @@ module ThinkFeelDoEngine
8
8
  DEFAULT_LESSON_MODULE_POSTFIX = %r{\/providers\/.*}
9
9
 
10
10
  def self.columns
11
- %w( participant_id lesson_id page_headers lesson_selected_at
12
- last_page_number_opened last_page_opened_at )
11
+ %w( participant_id lesson_id url page_headers lesson_selected_at
12
+ last_page_number_opened completed last_page_opened_at )
13
13
  end
14
14
 
15
15
  def self.participant_ids(ids)
@@ -86,9 +86,12 @@ module ThinkFeelDoEngine
86
86
  {
87
87
  participant_id: participant.study_id,
88
88
  lesson_id: lesson_id,
89
+ url: event.current_url,
89
90
  page_headers: event.headers,
90
91
  lesson_selected_at: event.emitted_at.iso8601,
91
92
  last_page_number_opened: last_page_opened[:number].to_i,
93
+ completed: last_page_opened[:number].to_i ==
94
+ ContentModules::LessonModule.find(lesson_id).slides.count,
92
95
  last_page_opened_at: last_page_opened[:opened_at].iso8601
93
96
  }
94
97
  end
@@ -4,7 +4,10 @@ module ThinkFeelDoEngine
4
4
  # Collect metadata for each Participant Activity.
5
5
  class PatientActivity
6
6
  def self.columns
7
- %w( participant_id activity_title created_at )
7
+ %w( participant_id activity_title created_at start_time end_time
8
+ actual_accomplishment_intensity actual_pleasure_intensity
9
+ predicted_accomplishment_intensity predicted_pleasure_intensity
10
+ noncompliance_reason is_reviewed )
8
11
  end
9
12
 
10
13
  def self.all
@@ -13,7 +16,18 @@ module ThinkFeelDoEngine
13
16
  {
14
17
  participant_id: participant.study_id,
15
18
  activity_title: activity.title,
16
- created_at: activity.created_at.iso8601
19
+ created_at: activity.created_at.iso8601,
20
+ start_time: activity.start_time,
21
+ end_time: activity.end_time,
22
+ actual_accomplishment_intensity:
23
+ activity.actual_accomplishment_intensity,
24
+ actual_pleasure_intensity: activity.actual_pleasure_intensity,
25
+ predicted_accomplishment_intensity:
26
+ activity.predicted_accomplishment_intensity,
27
+ predicted_pleasure_intensity:
28
+ activity.predicted_pleasure_intensity,
29
+ noncompliance_reason: activity.noncompliance_reason,
30
+ is_reviewed: activity.is_reviewed
17
31
  }
18
32
  end
19
33
  end.flatten
@@ -4,7 +4,8 @@ module ThinkFeelDoEngine
4
4
  # Collect metadata for all Participant Thoughts.
5
5
  class PatientThought
6
6
  def self.columns
7
- %w( participant_id content created_at )
7
+ %w( participant_id content effect created_at pattern challenging_thought
8
+ act_as_if )
8
9
  end
9
10
 
10
11
  def self.all
@@ -14,7 +15,11 @@ module ThinkFeelDoEngine
14
15
  {
15
16
  participant_id: participant.study_id,
16
17
  content: thought.content,
17
- created_at: thought.created_at.iso8601
18
+ effect: thought.effect,
19
+ created_at: thought.created_at.iso8601,
20
+ pattern: thought.pattern.try(:title),
21
+ challenging_thought: thought.challenging_thought,
22
+ act_as_if: thought.act_as_if
18
23
  }
19
24
  end
20
25
  end.flatten
@@ -13,7 +13,7 @@
13
13
  <%= render "weekly_counts", klass: GroupMetrics::WeeklyThoughtsCount, group_id: group.id, weeks: study_length_in_weeks %>
14
14
  </tr>
15
15
  <tr>
16
- <td><a href="#activities_future_table">activities monitored</a></td>
16
+ <td><a href="#activities_past_table">activities monitored</a></td>
17
17
  <%= render "weekly_counts", klass: GroupMetrics::WeeklyActivitiesCount.monitored, group_id: group.id, weeks: study_length_in_weeks %>
18
18
  </tr>
19
19
  <tr>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # nodoc
3
3
  module ThinkFeelDoEngine
4
- VERSION = "3.22.1"
4
+ VERSION = "3.22.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: think_feel_do_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.22.1
4
+ version: 3.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Carty-Fickes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-15 00:00:00.000000000 Z
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails