Skip to content
Snippets Groups Projects
Commit d0200e3a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'bug/249_duplicated_exceeded_visists' into 'master'

Bug/249 duplicated exceeded visists

See merge request NCER-PD/scheduling-system!170
parents b796570f 1f2de78f
No related branches found
No related tags found
1 merge request!170Bug/249 duplicated exceeded visists
Pipeline #7013 passed
...@@ -13,11 +13,11 @@ VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT = "APPROACHING_FOR_MAIL_CONTACT" ...@@ -13,11 +13,11 @@ VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT = "APPROACHING_FOR_MAIL_CONTACT"
VISIT_LIST_CHOICES = { VISIT_LIST_CHOICES = {
VISIT_LIST_GENERIC: 'Generic visit list', VISIT_LIST_GENERIC: 'Generic visit list',
VISIT_LIST_EXCEEDED_TIME: 'exceeded visit time', VISIT_LIST_EXCEEDED_TIME: 'Exceeded visit time',
VISIT_LIST_UNFINISHED: 'unfinished visits', VISIT_LIST_UNFINISHED: 'Unfinished visits',
VISIT_LIST_MISSING_APPOINTMENTS: 'visits with missing appointments', VISIT_LIST_MISSING_APPOINTMENTS: 'Visits with missing appointments',
VISIT_LIST_APPROACHING_WITHOUT_APPOINTMENTS: 'approaching visits', VISIT_LIST_APPROACHING_WITHOUT_APPOINTMENTS: 'Approaching visits',
VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT: 'post mail for approaching visits', VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT: 'Post mail for approaching visits',
} }
......
...@@ -247,7 +247,7 @@ def get_exceeded_visits(user): ...@@ -247,7 +247,7 @@ def get_exceeded_visits(user):
Q(visit_number__gt=1) | Q(appointment__status=Appointment.APPOINTMENT_STATUS_FINISHED)).filter( Q(visit_number__gt=1) | Q(appointment__status=Appointment.APPOINTMENT_STATUS_FINISHED)).filter(
# visits that have scheduled appointments should be excluded # visits that have scheduled appointments should be excluded
~Q(appointment__status=Appointment.APPOINTMENT_STATUS_SCHEDULED)).order_by( ~Q(appointment__status=Appointment.APPOINTMENT_STATUS_SCHEDULED)).order_by(
'datetime_begin') 'datetime_begin').distinct()
def get_missing_redcap_subjects(user, include_ignored=True): def get_missing_redcap_subjects(user, include_ignored=True):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment