Révision c6ef9ff5
Ajouté par Serghei Mihai (congés, retour 15/05) il y a presque 10 ans
calebasse/dossiers/models.py | ||
---|---|---|
13 | 13 |
from django.contrib.auth.models import User |
14 | 14 |
from django.core.validators import MinValueValidator |
15 | 15 |
|
16 |
import reversion |
|
17 |
|
|
18 | 16 |
from calebasse.choices import TYPE_OF_CONTRACT_CHOICES, DEFICIENCY_CHOICES |
19 | 17 |
from calebasse.models import PhoneNumberField, ZipCodeField |
20 | 18 |
from calebasse.personnes.models import People |
... | ... | |
170 | 168 |
self.end_date.day) |
171 | 169 |
super(SessadHealthCareNotification, self).save(**kwargs) |
172 | 170 |
|
173 |
reversion.register(CmppHealthCareDiagnostic, follow=['healthcare_ptr']) |
|
174 |
reversion.register(CmppHealthCareTreatment, follow=['healthcare_ptr']) |
|
175 |
reversion.register(SessadHealthCareNotification, follow=['healthcare_ptr']) |
|
176 |
|
|
177 | 171 |
class ProtectionStatus(NamedAbstractModel): |
178 | 172 |
|
179 | 173 |
class Meta: |
... | ... | |
999 | 993 |
return 0 |
1000 | 994 |
return (end_date.date() - first_act.date).days + 1 |
1001 | 995 |
|
1002 |
reversion.register(PatientRecord, follow=['people_ptr']) |
|
1003 |
|
|
1004 |
|
|
1005 | 996 |
def create_patient(first_name, last_name, service, creator, |
1006 | 997 |
date_selected=None): |
1007 | 998 |
logger.debug('create_patient: creation for patient %s %s in service %s ' |
Formats disponibles : Unified diff
useless models registering removed, because already registered by Django's admin