Project

General

Profile

Download (1.39 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / actes / forms.py @ 90ff0811

1
# -*- coding: utf-8 -*-
2

    
3
from django import forms
4

    
5
from calebasse.actes.models import Act
6
from ajax_select import make_ajax_field
7

    
8
class ActSearchForm(forms.Form):
9
    STATES = (
10
            ('valide', u'Validés'),
11
            ('non-valide', u'Non validé'),
12
            ('absent-or-canceled', u'Absent ou annulés'),
13
            ('is-billable', u'Facturable'),
14
            ('non-invoicable', u'Non facturable'),
15
            ('switch-billable', u'Inversion de facturabilité'),
16
            ('lost', u'Perdus'),
17
            ('pause-invoicing', u'Pause facturation'),
18
            ('invoiced', u'Facturé'),
19
#            ('current-invoicing', u'Facturation en cours')
20
            )
21

    
22
    INITIAL = [x[0] for x in STATES]
23

    
24
    last_name = forms.CharField(required=False)
25
    patient_record_id = forms.IntegerField(required=False)
26
    social_security_number = forms.CharField(required=False)
27

    
28
    doctor_name = forms.CharField(required=False)
29
    filters = forms.MultipleChoiceField(choices=STATES,
30
            widget=forms.CheckboxSelectMultiple)
31

    
32
class ActUpdate(forms.ModelForm):
33
    doctors = make_ajax_field(Act, 'doctors', 'intervenant', True)
34
    class Meta:
35
        model = Act
36
        fields = ('act_type', 'doctors', 'is_lost', 'pause', 'switch_billable', 'comment',
37
                'valide')
38
        widgets = {
39
                'comment': forms.Textarea(attrs={'cols': 52, 'rows': 4}),
40
                }
41

    
42

    
43
        
(3-3/9)