Revision c1cdf73f
Added by Benjamin Dauvergne about 13 years ago
| calebasse/dossiers/models.py | ||
|---|---|---|
|
aggregate(Min('date_selected'))['date_selected__min']
|
||
|
return d and d.date()
|
||
|
|
||
|
|
||
|
@property
|
||
|
def exit_date(self):
|
||
|
if self.last_state.status.type != 'CLOS':
|
||
|
return None
|
||
|
d = self.filestate_set.filter(status__type='CLOS'). \
|
||
|
aggregate(Max('date_selected'))['date_selected__max']
|
||
|
return d and d.date()
|
||
Also available in: Unified diff
dossiers: only report an exit date if a patient record is currently closed