Projet

Général

Profil

« Précédent | Suivant » 

Révision 1a3d8912

Ajouté par Jérôme Schneider il y a presque 10 ans

dossiers: merge administrative forms into one form

Closes #2739

Voir les différences:

calebasse/dossiers/forms.py
106 106
                'pause_comment': forms.Textarea(attrs={'cols': 50, 'rows': 3}),
107 107
                }
108 108

  
109
class CivilStatusForm(ModelForm):
109
class AdministrativeForm(ModelForm):
110
    coordinators = make_ajax_field(PatientRecord, 'coordinators', 'worker', True)
110 111
    class Meta:
111 112
        model = PatientRecord
112
        fields = ('first_name', 'last_name', 'birthdate', 'birthplace', 'gender', 'nationality')
113
        # ID
114
        fields = ('first_name', 'last_name', 'birthdate', 'birthplace',
115
                'gender', 'nationality',)
116
        # inscription
117
        fields += ('analysemotive', 'familymotive', 'provenance',
118
            'advicegiver', 'provenanceplace',)
119
        # out
120
        fields += ('outmotive', 'outto',)
121
        # family
122
        fields += ('sibship_place', 'nb_children_family', 'parental_authority',
123
                'family_situation', 'child_custody', 'job_mother', 'job_father',
124
                'rm_mother', 'rm_father', 'family_comment',)
125
        # transport
126
        fields += ('transporttype', 'transportcompany',
127
                  'simple_appointment_transport', 'periodic_appointment_transport',)
128
        # Follow up
129
        fields += ('coordinators', 'externaldoctor', 'externalintervener',)
130
        widgets = {
131
                'family_comment': forms.Textarea(attrs={'cols': 50, 'rows': 1}),
132
                }
113 133

  
114 134

  
115 135
class PhysiologyForm(ModelForm):
......
148 168
                CodeCFTMEA.objects.filter(axe=3)
149 169

  
150 170

  
151
class InscriptionForm(ModelForm):
152
    class Meta:
153
        model = PatientRecord
154
        fields = ('analysemotive', 'familymotive', 'provenance',
155
            'advicegiver', 'provenanceplace')
156
        widgets = {}
157

  
158
class OutForm(ModelForm):
159
    class Meta:
160
        model = PatientRecord
161
        fields = ('outmotive', 'outto')
162
        widgets = {}
163

  
164
class FamilyForm(ModelForm):
165
    class Meta:
166
        model = PatientRecord
167
        fields = ('sibship_place', 'nb_children_family', 'parental_authority',
168
                'family_situation', 'child_custody', 'job_mother', 'job_father',
169
                'rm_mother', 'rm_father', 'family_comment')
170
        widgets = {
171
                'family_comment': forms.Textarea(attrs={'cols': 50, 'rows': 1}),
172
                }
173

  
174
class TransportFrom(ModelForm):
175
    class Meta:
176
        model = PatientRecord
177
        fields = ('transporttype', 'transportcompany',
178
                  'simple_appointment_transport', 'periodic_appointment_transport')
179

  
180 171
class PaperIDForm(ModelForm):
181 172
    class Meta:
182 173
        model = PatientRecord
......
191 182
                'contact_comment': forms.Textarea(attrs={'cols': 50, 'rows': 2}),
192 183
                }
193 184

  
194
class FollowUpForm(ModelForm):
195
    coordinators = make_ajax_field(PatientRecord, 'coordinators', 'worker', True)
196
    class Meta:
197
        model = PatientRecord
198
        fields = ('coordinators', 'externaldoctor', 'externalintervener')
199

  
200 185
class PatientContactForm(ModelForm):
201 186
    health_org = forms.CharField(label=u"Numéro de l'organisme destinataire", required=False)
202 187

  

Formats disponibles : Unified diff