Revision 831983bb
Added by Jérôme Schneider over 13 years ago
| calebasse/actes/models.py | ||
|---|---|---|
|
doctors = models.ManyToManyField('personnes.Worker',
|
||
|
limit_choices_to={'type__intervene': True},
|
||
|
verbose_name=u'Thérapeutes')
|
||
|
histories = models.ManyToManyField('HistoryAct',
|
||
|
blank=True, null=True)
|
||
|
|
||
|
def is_absent(self):
|
||
|
if self.get_state() in ('ABS_NON_EXC', 'ABS_EXC', 'ANNUL_NOUS',
|
||
| ... | ... | |
|
ordering = ['-date', 'patient']
|
||
|
|
||
|
|
||
|
class HistoryAct(models.Model):
|
||
|
EVENT_CHOICES = (
|
||
|
('NR', u'Nouveau rendez-vous'),
|
||
|
('AV', u'Acte validé'),
|
||
|
('CF', u'En cours de facturation'),
|
||
|
('AF', u'Acte facturé'),
|
||
|
)
|
||
|
date = models.DateTimeField()
|
||
|
event_type = models.CharField(max_length=2,
|
||
|
choices=EVENT_CHOICES)
|
||
|
description = models.TextField(default='')
|
||
|
|
||
|
|
||
|
class EventActManager(EventManager):
|
||
|
|
||
|
def create_patient_appointment(self, creator, title, patient, participants,
|
||
Also available in: Unified diff
actes: remove acthistory
I will plug it to the new state management