Project

General

Profile

« Previous | Next » 

Revision 47b11707

Added by Jérôme Schneider over 12 years ago

models: improve models to manage validation ac

View differences:

calebasse/actes/models.py
47 47
    doctors = models.ManyToManyField('personnes.Worker',
48 48
            limit_choices_to={'type__intervene': True},
49 49
            verbose_name=u'Thérapeutes')
50
    histories = models.ManyToManyField('HistoryAct')
50 51

  
51 52
    def is_absent(self):
52 53
        if self.get_state() in ('ABS_NON_EXC', 'ABS_EXC', 'ANNUL_NOUS',
......
86 87
        ordering = ['-date', 'patient']
87 88

  
88 89

  
90
class HistoryAct(models.Model):
91
    EVENT_CHOICES = (
92
            ('NR', u'Nouveau rendez-vous'),
93
            ('AV', u'Acte validé'),
94
            ('CF', u'En cours de facturation'),
95
            ('AF', u'Acte facturé'),
96
            )
97
    date = models.DateTimeField()
98
    event_type = models.CharField(max_length=2,
99
            choices=EVENT_CHOICES)
100
    description = models.TextField(default='')
101

  
102

  
89 103
class EventActManager(EventManager):
90 104

  
91 105
    def create_patient_appointment(self, creator, title, patient, participants,
calebasse/dossiers/models.py
60 60
        editable=False)
61 61
    contacts = models.ManyToManyField('personnes.People',
62 62
            related_name='contact_of')
63
    birthdate = models.DateField()
64
    paper_id = models.CharField(max_length=12)
63 65

  
64 66
    def __init__(self, *args, **kwargs):
65 67
        super(PatientRecord, self).__init__(*args, **kwargs)

Also available in: Unified diff