Project

General

Profile

Download (938 Bytes) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / dossiers / forms.py @ f3407c83

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

    
3
from django import forms
4
from django.forms import ModelForm, Form
5

    
6
from models import PatientRecord
7
from states import STATE_CHOICES
8

    
9
class EditPatientRecordForm(ModelForm):
10
    class Meta:
11
        model = PatientRecord
12

    
13
class SearchForm(Form):
14
    last_name = forms.CharField(label=u'Nom', required=False)
15
    first_name = forms.CharField(label=u'Prénom', required=False)
16
    folder_id = forms.CharField(label=u'Numéro de dossier', required=False)
17
    social_security_id = forms.CharField(label=u"Numéro d'assuré social", required=False)
18
    states = forms.MultipleChoiceField(
19
            widget=forms.CheckboxSelectMultiple(attrs={'class':'checkbox_state'}),
20
            label=u"test",
21
            choices=STATE_CHOICES, initial=(0,1,2,3,4))
22

    
23
class CivilStatusForm(ModelForm):
24
    class Meta:
25
        model = PatientRecord
26
        fields = ('first_name', 'last_name', 'birthdate', 'gender', 'nationality')
(3-3/8)