Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
2536936e
Commit
2536936e
authored
6 years ago
by
Carlos Vega
Browse files
Options
Downloads
Patches
Plain Diff
considered new property 'excluded' from study subject
parent
b13fe510
No related branches found
No related tags found
1 merge request
!178
Feature/import data pdp
Pipeline
#7237
passed
6 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/tests/functions.py
+1
-0
1 addition, 0 deletions
smash/web/tests/functions.py
smash/web/views/notifications.py
+4
-2
4 additions, 2 deletions
smash/web/views/notifications.py
with
5 additions
and
2 deletions
smash/web/tests/functions.py
+
1
−
0
View file @
2536936e
...
@@ -56,6 +56,7 @@ def create_empty_study_columns():
...
@@ -56,6 +56,7 @@ def create_empty_study_columns():
information_sent
=
False
,
information_sent
=
False
,
pd_in_family
=
False
,
pd_in_family
=
False
,
resigned
=
False
,
resigned
=
False
,
excluded
=
False
,
resign_reason
=
False
,
resign_reason
=
False
,
)
)
...
...
This diff is collapsed.
Click to expand it.
smash/web/views/notifications.py
+
4
−
2
View file @
2536936e
...
@@ -185,7 +185,7 @@ def get_subjects_with_almost_expired_vouchers(user):
...
@@ -185,7 +185,7 @@ def get_subjects_with_almost_expired_vouchers(user):
contact_attempt_min_date
=
get_today_midnight_date
()
-
datetime
.
timedelta
(
days
=
7
)
contact_attempt_min_date
=
get_today_midnight_date
()
-
datetime
.
timedelta
(
days
=
7
)
result
=
StudySubject
.
objects
.
filter
(
result
=
StudySubject
.
objects
.
filter
(
subject__dead
=
False
,
subject__dead
=
False
,
resigned
=
False
,
resigned
=
False
,
excluded
=
False
,
default_location__in
=
get_filter_locations
(
user
),
default_location__in
=
get_filter_locations
(
user
),
).
annotate
(
last_contact
=
Max
(
Case
(
When
(
contactattempt__success
=
True
,
then
=
"
contactattempt__datetime_when
"
)))).
filter
(
).
annotate
(
last_contact
=
Max
(
Case
(
When
(
contactattempt__success
=
True
,
then
=
"
contactattempt__datetime_when
"
)))).
filter
(
Q
(
vouchers__status
=
VOUCHER_STATUS_NEW
)
&
Q
(
vouchers__expiry_date__lte
=
notification_min_date
)).
filter
(
Q
(
vouchers__status
=
VOUCHER_STATUS_NEW
)
&
Q
(
vouchers__expiry_date__lte
=
notification_min_date
)).
filter
(
...
@@ -198,7 +198,7 @@ def get_subjects_with_reminder(user):
...
@@ -198,7 +198,7 @@ def get_subjects_with_reminder(user):
result
=
StudySubject
.
objects
.
filter
(
result
=
StudySubject
.
objects
.
filter
(
subject__dead
=
False
,
subject__dead
=
False
,
resigned
=
False
,
resigned
=
False
,
excluded
=
False
,
default_location__in
=
get_filter_locations
(
user
),
default_location__in
=
get_filter_locations
(
user
),
datetime_contact_reminder__lt
=
tomorrow
,
datetime_contact_reminder__lt
=
tomorrow
,
)
)
...
@@ -222,6 +222,7 @@ def get_approaching_visits_without_appointments(user):
...
@@ -222,6 +222,7 @@ def get_approaching_visits_without_appointments(user):
my_count
=
Count
(
Case
(
When
(
appointment__status
=
Appointment
.
APPOINTMENT_STATUS_SCHEDULED
,
then
=
1
)))).
filter
(
my_count
=
Count
(
Case
(
When
(
appointment__status
=
Appointment
.
APPOINTMENT_STATUS_SCHEDULED
,
then
=
1
)))).
filter
(
subject__subject__dead
=
False
,
subject__subject__dead
=
False
,
subject__resigned
=
False
,
subject__resigned
=
False
,
subject__excluded
=
False
,
datetime_begin__gt
=
today
,
datetime_begin__gt
=
today
,
datetime_begin__lt
=
today_plus_two_months
,
datetime_begin__lt
=
today_plus_two_months
,
is_finished
=
False
,
is_finished
=
False
,
...
@@ -237,6 +238,7 @@ def get_approaching_visits_for_mail_contact(user):
...
@@ -237,6 +238,7 @@ def get_approaching_visits_for_mail_contact(user):
my_count
=
Count
(
Case
(
When
(
appointment__status
=
Appointment
.
APPOINTMENT_STATUS_SCHEDULED
,
then
=
1
)))).
filter
(
my_count
=
Count
(
Case
(
When
(
appointment__status
=
Appointment
.
APPOINTMENT_STATUS_SCHEDULED
,
then
=
1
)))).
filter
(
subject__subject__dead
=
False
,
subject__subject__dead
=
False
,
subject__resigned
=
False
,
subject__resigned
=
False
,
subject__excluded
=
False
,
datetime_begin__gt
=
today_plus_three_months
,
datetime_begin__gt
=
today_plus_three_months
,
datetime_begin__lt
=
today_plus_six_months
,
datetime_begin__lt
=
today_plus_six_months
,
is_finished
=
False
,
is_finished
=
False
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment