def total(self, case): for action in case.actions: if visit_is(action, 'reg'): if not action.date: logging.error('Reg action has no date! Case %s' % case.get_id) else: yield action.date
def _filter(a): return (visit_is(a, self.visit_type) # right type and date_in_range(a.date.date(), date) # within window and a.date > getters.date_modified( form, force_to_date=False, force_to_datetime=True) # came after "due" visit and a.xform_id not in self._visits_used ) # not already counted
def _total_action_filter(self, a): return any(visit_is(a, visit_type) for visit_type in self.form_types)
def _filter(a): return (visit_is(a, self.visit_type) # right type and date_in_range(a.date.date(), date) # within window and a.date > getters.date_modified(form, force_to_date=False, force_to_datetime=True) # came after "due" visit and a.xform_id not in self._visits_used) # not already counted
def action_filter(self, action): return visit_is(action, 'bp')