actes: add a HistoryAct object

This commit is contained in:
Jérôme Schneider 2012-11-02 16:44:19 +01:00
parent 47b11707c0
commit e37c8bd196
5 changed files with 14 additions and 6 deletions

View File

@ -128,12 +128,16 @@ class EventActManager(EventManager):
label=u"Rendez-vous patient"
)
history = HistoryAct.objects.create(
date = datetime.now(),
event_type = 'NR')
act_event = EventAct.objects.create(
title=title,
event_type=event_type,
patient=patient,
act_type=act_type,
date=start_datetime,
histories = [history]
)
act_event.doctors = participants
ActValidationState(act=act_event, state_name='NON_VALIDE',

View File

@ -23,7 +23,7 @@ agenda_patterns = patterns('',
name='activite-du-service'),
url(r'^validation-des-actes/$',
TemplateView.as_view(
template_name='agenda/validation-des-actes.html'),
template_name='agenda/act-validation.html'),
name='validation-des-actes'),
url(r'^rendez-vous-periodiques/$',
TemplateView.as_view(

View File

@ -61,7 +61,8 @@ class PatientRecord(ServiceLinkedAbstractModel, People):
contacts = models.ManyToManyField('personnes.People',
related_name='contact_of')
birthdate = models.DateField()
paper_id = models.CharField(max_length=12)
paper_id = models.CharField(max_length=12,
null=True, blank=True)
def __init__(self, *args, **kwargs):
super(PatientRecord, self).__init__(*args, **kwargs)

View File

@ -11,7 +11,9 @@
2,
3,
4
]
],
"paper_id": "1024",
"birthdate": "1980-10-31"
}
},
{
@ -26,7 +28,8 @@
2,
3,
4
]
}
],
"birthdate": "1988-12-30"
}
}
]

View File

@ -14,7 +14,7 @@ setup(name='calebasse',
install_requires=[
'django >= 1.4.2, < 1.5',
'south >= 0.7',
'django-reversion >= 1.6.2',
'django-reversion >= 1.6.4',
'python-dateutil >=1.5, < 2.0',
'django-model-utils < 1.2.0',
'django-ajax-selects < 1.3.0',