def add_study_dt(self): return self.annotate( study_dt=utils.sqlite_date_diff('contact__created', 'created', days=True), delivery_dt=utils.sqlite_date_diff('contact__delivery_date', 'created', days=True))
def add_success_dt(self): return self.annotate(success_dt=utils.sqlite_date_diff( 'created', 'external_success_time')).order_by('-success_dt')