Projet

Général

Profil

« Précédent | Suivant » 

Révision aa31cdc8

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

dossiers: begin "ajaxification" of patientrecord

WARNING: with this commit the patientrecord is not usable

Refs #2357

Voir les différences:

calebasse/dossiers/templates/dossiers/base.html
1 1
{% extends "calebasse/base.html" %}
2 2
{% load url from future %}
3 3

  
4
{% block extrastyles %}
5
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/dossiers.css" />
6
{% endblock extrastyles %}
7

  
8

  
4 9
{% block extrascripts %}
5 10
<script src="{{ STATIC_URL }}js/jquery.parse-url.js"></script>
6 11
<script src="{{ STATIC_URL }}js/calebasse.dossiers.js"></script>
calebasse/dossiers/templates/dossiers/patientrecord_tab1_general.html
1

  
2
<form method="post" id="general-form" class="patientrecordform">{% csrf_token %}
1
<form method="post" action="tab1"  id="general-form" class="patientrecordform">{% csrf_token %}
3 2
<div class="left">
4 3
  <ul>
5 4
    <li>
......
41 40
        {% else %}Aucun{% endif %}
42 41
    </li>
43 42
      <li><label>Commentaire </label> <button class="save enable-on-change btn-maj">✔</button><br/>
44
      {{ forms.general.comment }}
43
      {{ form.comment }}
45 44
      </li>
46 45
    </ul>
47 46
  </div>
......
84 83
      <button type="button" id="patientrecord-history">Historique</button><br/>
85 84
      <hr/>
86 85
      <p id="confidential-msg" style="display: none; font-size: 10px;">Confidentialité mise à jour</p>
87
      {{ forms.general.confidential.label_tag }} : {{ forms.general.confidential }}
86
      {{ form.confidential.label_tag }} : {{ form.confidential }}
88 87
      <p id="pause-msg" style="display: none; font-size: 10px;">Pause facturation mise à jour</p>
89
      {{ forms.general.pause.label_tag }} : {{ forms.general.pause }}
88
      {{ form.pause.label_tag }} : {{ form.pause }}
90 89
      <br/><label>Commentaire de la pause facturation</label> <button class="save enable-on-change btn-maj">✔</button><br/>
91
      {{ forms.general.pause_comment }}
90
      {{ form.pause_comment }}
92 91

  
93 92
    </div>
94 93
  </form>
......
106 105
    {% endif %}
107 106

  
108 107

  
109
    <form method="post" id="create-directory-form" action="create-directory">{% csrf_token %}
108
    <form method="post" action="tab1" id="create-directory-form" action="create-directory">{% csrf_token %}
110 109
      <button>Créer répertoire patient</button>
111 110
    </form>
112 111
</div>
calebasse/dossiers/templates/dossiers/patientrecord_tab2_fiche_adm.html
1
<form method="post" id="id-form" class="patientrecordform">
2
  {% csrf_token %}
3
  <div class="frame inline">
4
    <h3>État civil</h3>
1
<div id="tabs-2">
2
  <form method="post" action="tab2" id="id-form" class="patientrecordform">{% csrf_token %}
3
    <div class="frame inline">
4
      <h3>État civil</h3>
5 5
      <button class="save">✔</button>
6
    <table class="basic">
7
    <tbody>
8
    <tr><td class="width-limited">{{ forms.id.last_name.label_tag }}</td><td><span class="lastname">{{ forms.id.last_name }}</span></td><td>{{ forms.id.last_name.errors }}</td></tr>
9
    <tr><td class="width-limited">{{ forms.id.first_name.label_tag }}</td><td>{{ forms.id.first_name }}</td><td>{{ forms.id.first_name.errors }}</td></tr>
10
    <tr><td class="width-limited">{{ forms.id.birthplace.label_tag }}</td><td>{{ forms.id.birthplace }}</td><td>{{ forms.id.birthplace.errors }}</td></tr>
11
    <tr><td class="width-limited">{{ forms.id.birthdate.label_tag }}</td><td>{{ forms.id.birthdate }}</td><td>{{ forms.id.birthdate.errors }}</td></tr>
12
    <tr><td class="width-limited">{{ forms.id.gender.label_tag }}</td><td>{{ forms.id.gender }}</td><td>{{ forms.id.gender.errors }}</td></tr>
13
    <tr><td class="width-limited">{{ forms.id.nationality.label_tag }}</td><td>{{ forms.id.nationality }}</td><td>{{ forms.id.nationality.errors }}</td></tr>
14
    </tbody>
15
    </table>
16
    <input type="hidden"  name="tab"  value="1">
17
  </div>
18
</form>
6
      <table class="basic">
7
        <tbody>
8
        <tr><td class="width-limited">{{ forms.id.last_name.label_tag }}</td><td><span class="lastname">{{ forms.id.last_name }}</span></td><td>{{ forms.id.last_name.errors }}</td></tr>
9
        <tr><td class="width-limited">{{ forms.id.first_name.label_tag }}</td><td>{{ forms.id.first_name }}</td><td>{{ forms.id.first_name.errors }}</td></tr>
10
        <tr><td class="width-limited">{{ forms.id.birthplace.label_tag }}</td><td>{{ forms.id.birthplace }}</td><td>{{ forms.id.birthplace.errors }}</td></tr>
11
        <tr><td class="width-limited">{{ forms.id.birthdate.label_tag }}</td><td>{{ forms.id.birthdate }}</td><td>{{ forms.id.birthdate.errors }}</td></tr>
12
        <tr><td class="width-limited">{{ forms.id.gender.label_tag }}</td><td>{{ forms.id.gender }}</td><td>{{ forms.id.gender.errors }}</td></tr>
13
        <tr><td class="width-limited">{{ forms.id.nationality.label_tag }}</td><td>{{ forms.id.nationality }}</td><td>{{ forms.id.nationality.errors }}</td></tr>
14
        </tbody>
15
      </table>
16
      <input type="hidden"  name="tab"  value="1">
17
    </div>
18
  </form>
19 19

  
20
<form method="post" id="inscription-form" class="patientrecordform">
21
  {% csrf_token %}
22
  <div class="frame inline">
23
    <h3>Inscription</h3>
20
  <form method="post" action="tab2" id="inscription-form" class="patientrecordform">
21
    {% csrf_token %}
22
    <div class="frame inline">
23
      <h3>Inscription</h3>
24 24
      <button class="save">✔</button>
25
    <table class="basic">
26
    <tbody>
27
    {% for field in forms.inscription %}
28
    <tr><td class="width-limited">{{ field.label_tag  }}</td><td>{{ field }}
29
    <button type="button"
30
      class="dialog-button"
31
      data-url="../../ressources/{{ field.name }}/new/ #form-content"
32
      data-default-button="Ajouter"
33
      data-next-url="{{ request.get_full_path }}#tab=1"
34
      data-add-select="#id_inscription-{{ field.name }}"
35
      title="Ajouter un {{ field.label.lower }}"
36
      type="button">+</button></td><td>{{ field.errors }}</td></tr>
37
    {% endfor %}
38
    </tbody>
39
    </table>
40
    <input type="hidden"  name="tab"  value="1">
41
  </div>
42
</form>
25
      <table class="basic">
26
        <tbody>
27
        {% for field in forms.inscription %}
28
        <tr><td class="width-limited">{{ field.label_tag  }}</td><td>{{ field }}
29
            <button type="button"
30
              class="dialog-button"
31
              data-url="../../ressources/{{ field.name }}/new/ #form-content"
32
              data-default-button="Ajouter"
33
              data-next-url="{{ request.get_full_path }}#tab=1"
34
              data-add-select="#id_inscription-{{ field.name }}"
35
              title="Ajouter un {{ field.label.lower }}"
36
              type="button">+</button></td><td>{{ field.errors }}</td></tr>
37
        {% endfor %}
38
        </tbody>
39
      </table>
40
      <input type="hidden"  name="tab"  value="1">
41
    </div>
42
  </form>
43 43

  
44
<form method="post" id="out-form" class="patientrecordform">
45
  {% csrf_token %}
46
  <div class="frame inline">
47
    <h3>Sortie</h3>
44
  <form method="post" action="tab2" id="out-form" class="patientrecordform">
45
    {% csrf_token %}
46
    <div class="frame inline">
47
      <h3>Sortie</h3>
48 48
      <button class="save">✔</button>
49
    <table class="basic">
50
    <tbody>
51
    {% for field in forms.out %}
52
    <tr><td class="width-limited">{{ field.label_tag  }}</td><td>{{ field }}
53
    <button type="button"
54
      class="dialog-button"
55
      data-url="../../ressources/{{ field.name }}/new/ #form-content"
56
      data-default-button="Ajouter"
57
      data-next-url="{{ request.get_full_path }}#tab=1"
58
      data-add-select="#id_out-{{ field.name }}"
59
      title="Ajouter un {{ field.label.lower }}"
60
      type="button">+</button></td><td>{{ field.errors }}</td></tr>
61
    {% endfor %}
62
    </tbody>
63
    </table>
64
    <input type="hidden"  name="tab"  value="1">
65
  </div>
66
</form>
49
      <table class="basic">
50
        <tbody>
51
        {% for field in forms.out %}
52
        <tr><td class="width-limited">{{ field.label_tag  }}</td><td>{{ field }}
53
            <button type="button"
54
              class="dialog-button"
55
              data-url="../../ressources/{{ field.name }}/new/ #form-content"
56
              data-default-button="Ajouter"
57
              data-next-url="{{ request.get_full_path }}#tab=1"
58
              data-add-select="#id_out-{{ field.name }}"
59
              title="Ajouter un {{ field.label.lower }}"
60
              type="button">+</button></td><td>{{ field.errors }}</td></tr>
61
        {% endfor %}
62
        </tbody>
63
      </table>
64
      <input type="hidden"  name="tab"  value="1">
65
    </div>
66
  </form>
67 67

  
68
<form method="post" id="family-form" class="patientrecordform">
69
  {% csrf_token %}
70
  <div class="frame inline">
71
    <h3>Famille</h3>
68
  <form method="post" action="tab2" id="family-form" class="patientrecordform">
69
    {% csrf_token %}
70
    <div class="frame inline">
71
      <h3>Famille</h3>
72 72
      <button class="save">✔</button>
73
    <table class="basic">
74
    <tbody>
75
    <tr><td class="width-limited">{{ forms.family.sibship_place.label_tag  }}</td><td>{{ forms.family.sibship_place }}</td><td>{{ forms.family.sibship_place.errors }}</td></tr>
76
    <tr><td class="width-limited">{{ forms.family.nb_children_family.label_tag  }}</td><td>{{ forms.family.nb_children_family }}</td><td>{{ forms.family.nb_children_family.errors }}</td></tr>
77
    <tr><td class="width-limited"><label>Rang (gémellité) :  </label></td><td>{{ object.twinning_rank|default_if_none:"Aucun" }}</td><td></td></tr>
78
    <tr><td class="width-limited">{{ forms.family.parental_authority.label_tag  }}</td><td>{{ forms.family.parental_authority }}
79
    <button type="button"
80
      class="dialog-button"
81
      data-url="../../ressources/parentalauthoritytype/new/ #form-content"
82
      data-default-button="Ajouter"
83
      data-next-url="{{ request.get_full_path }}#tab=1"
84
      data-add-select="#id_family-parental_authority"
85
      title="Ajouter un type d'autorité parentale">+</button></td><td>{{ forms.family.parental_authority.errors }}</td></tr>
86
    <tr><td class="width-limited">{{ forms.family.family_situation.label_tag  }}</td><td>{{ forms.family.family_situation }}
87
    <button type="button"
88
      class="dialog-button"
89
      data-url="../../ressources/familysituationtype/new/ #form-content"
90
      data-default-button="Ajouter"
91
      data-next-url="{{ request.get_full_path }}#tab=1"
92
      data-add-select="#id_family-family_situation"
93
      title="Ajouter un type de situation familiale">+</button></td><td>{{ forms.family.family_situation.errors }}</td></tr>
94
    <tr><td class="width-limited">{{ forms.family.child_custody.label_tag  }}</td><td>{{ forms.family.child_custody }}
95
    <button type="button"
96
      class="dialog-button"
97
      data-url="../../ressources/parentalcustodytype/new/ #form-content"
98
      data-default-button="Ajouter"
99
      data-next-url="{{ request.get_full_path }}#tab=1"
100
      data-add-select="#id_family-child_custody"
101
      title="Ajouter un type de garde parentale">+</button></td><td>{{ forms.family.child_custody.errors }}</td></tr>
102
    <tr><td class="width-limited">{{ forms.family.job_mother.label_tag  }}</td><td>{{ forms.family.job_mother }}
103
    <button type="button"
104
      class="dialog-button"
105
      data-url="../../ressources/job/new/ #form-content"
106
      data-default-button="Ajouter"
107
      data-next-url="{{ request.get_full_path }}#tab=1"
108
      data-add-select="#id_family-job_mother"
109
      title="Ajouter un type de profession">+</button></td><td>{{ forms.family.job_mother.errors }}</td></tr>
110
    <tr><td class="width-limited">{{ forms.family.job_father.label_tag  }}</td><td>{{ forms.family.job_father }}
111
    <button type="button"
112
      class="dialog-button"
113
      data-url="../../ressources/job/new/ #form-content"
114
      data-default-button="Ajouter"
115
      data-next-url="{{ request.get_full_path }}#tab=1"
116
      data-add-select="#id_family-job_father"
117
      title="Ajouter un type de profession">+</button></td><td>{{ forms.family.job_father.errors }}</td></tr>
118
    <tr><td class="width-limited">{{ forms.family.rm_mother.label_tag  }}</td><td>{{ forms.family.rm_mother }}
119
    <button type="button"
120
      class="dialog-button"
121
      data-url="../../ressources/maritalstatustype/new/ #form-content"
122
      data-default-button="Ajouter"
123
      data-next-url="{{ request.get_full_path }}#tab=1"
124
      data-add-select="#id_family-rm_mother"
125
      title="Ajouter un type de régime">+</button></td><td>{{ forms.family.rm_mother.errors }}</td></tr>
126
    <tr><td class="width-limited">{{ forms.family.rm_father.label_tag  }}</td><td>{{ forms.family.rm_father }}
127
    <button type="button"
128
      class="dialog-button"
129
      data-url="../../ressources/maritalstatustype/new/ #form-content"
130
      data-default-button="Ajouter"
131
      data-next-url="{{ request.get_full_path }}#tab=1"
132
      data-add-select="#id_family-rm_father"
133
      title="Ajouter un type de régime">+</button></td><td>{{ forms.family.rm_father.errors }}</td></tr>
134
    <tr><td class="width-limited">{{ forms.family.family_comment.label_tag  }}</td><td>{{ forms.family.family_comment }}</td><td>{{ forms.family.family_comment.errors }}</td></tr>
135
    </tbody>
136
    </table>
137
    <input type="hidden"  name="tab"  value="1">
138
  </div>
139
</form>
73
      <table class="basic">
74
        <tbody>
75
        <tr><td class="width-limited">{{ forms.family.sibship_place.label_tag  }}</td><td>{{ forms.family.sibship_place }}</td><td>{{ forms.family.sibship_place.errors }}</td></tr>
76
        <tr><td class="width-limited">{{ forms.family.nb_children_family.label_tag  }}</td><td>{{ forms.family.nb_children_family }}</td><td>{{ forms.family.nb_children_family.errors }}</td></tr>
77
        <tr><td class="width-limited"><label>Rang (gémellité) :  </label></td><td>{{ object.twinning_rank|default_if_none:"Aucun" }}</td><td></td></tr>
78
        <tr><td class="width-limited">{{ forms.family.parental_authority.label_tag  }}</td><td>{{ forms.family.parental_authority }}
79
            <button type="button"
80
              class="dialog-button"
81
              data-url="../../ressources/parentalauthoritytype/new/ #form-content"
82
              data-default-button="Ajouter"
83
              data-next-url="{{ request.get_full_path }}#tab=1"
84
              data-add-select="#id_family-parental_authority"
85
              title="Ajouter un type d'autorité parentale">+</button></td><td>{{ forms.family.parental_authority.errors }}</td></tr>
86
        <tr><td class="width-limited">{{ forms.family.family_situation.label_tag  }}</td><td>{{ forms.family.family_situation }}
87
            <button type="button"
88
              class="dialog-button"
89
              data-url="../../ressources/familysituationtype/new/ #form-content"
90
              data-default-button="Ajouter"
91
              data-next-url="{{ request.get_full_path }}#tab=1"
92
              data-add-select="#id_family-family_situation"
93
              title="Ajouter un type de situation familiale">+</button></td><td>{{ forms.family.family_situation.errors }}</td></tr>
94
        <tr><td class="width-limited">{{ forms.family.child_custody.label_tag  }}</td><td>{{ forms.family.child_custody }}
95
            <button type="button"
96
              class="dialog-button"
97
              data-url="../../ressources/parentalcustodytype/new/ #form-content"
98
              data-default-button="Ajouter"
99
              data-next-url="{{ request.get_full_path }}#tab=1"
100
              data-add-select="#id_family-child_custody"
101
              title="Ajouter un type de garde parentale">+</button></td><td>{{ forms.family.child_custody.errors }}</td></tr>
102
        <tr><td class="width-limited">{{ forms.family.job_mother.label_tag  }}</td><td>{{ forms.family.job_mother }}
103
            <button type="button"
104
              class="dialog-button"
105
              data-url="../../ressources/job/new/ #form-content"
106
              data-default-button="Ajouter"
107
              data-next-url="{{ request.get_full_path }}#tab=1"
108
              data-add-select="#id_family-job_mother"
109
              title="Ajouter un type de profession">+</button></td><td>{{ forms.family.job_mother.errors }}</td></tr>
110
        <tr><td class="width-limited">{{ forms.family.job_father.label_tag  }}</td><td>{{ forms.family.job_father }}
111
            <button type="button"
112
              class="dialog-button"
113
              data-url="../../ressources/job/new/ #form-content"
114
              data-default-button="Ajouter"
115
              data-next-url="{{ request.get_full_path }}#tab=1"
116
              data-add-select="#id_family-job_father"
117
              title="Ajouter un type de profession">+</button></td><td>{{ forms.family.job_father.errors }}</td></tr>
118
        <tr><td class="width-limited">{{ forms.family.rm_mother.label_tag  }}</td><td>{{ forms.family.rm_mother }}
119
            <button type="button"
120
              class="dialog-button"
121
              data-url="../../ressources/maritalstatustype/new/ #form-content"
122
              data-default-button="Ajouter"
123
              data-next-url="{{ request.get_full_path }}#tab=1"
124
              data-add-select="#id_family-rm_mother"
125
              title="Ajouter un type de régime">+</button></td><td>{{ forms.family.rm_mother.errors }}</td></tr>
126
        <tr><td class="width-limited">{{ forms.family.rm_father.label_tag  }}</td><td>{{ forms.family.rm_father }}
127
            <button type="button"
128
              class="dialog-button"
129
              data-url="../../ressources/maritalstatustype/new/ #form-content"
130
              data-default-button="Ajouter"
131
              data-next-url="{{ request.get_full_path }}#tab=1"
132
              data-add-select="#id_family-rm_father"
133
              title="Ajouter un type de régime">+</button></td><td>{{ forms.family.rm_father.errors }}</td></tr>
134
        <tr><td class="width-limited">{{ forms.family.family_comment.label_tag  }}</td><td>{{ forms.family.family_comment }}</td><td>{{ forms.family.family_comment.errors }}</td></tr>
135
        </tbody>
136
      </table>
137
      <input type="hidden"  name="tab"  value="1">
138
    </div>
139
  </form>
140 140

  
141
<form method="post" id="transport-form" class="patientrecordform">
142
  {% csrf_token %}
143
  <div class="frame inline">
144
    <h3>Transport</h3>
141
  <form method="post" action="tab2" id="transport-form" class="patientrecordform">
142
    {% csrf_token %}
143
    <div class="frame inline">
144
      <h3>Transport</h3>
145 145
      <button class="save">✔</button>
146
    <table class="basic">
147
    <tbody>
148
    {% for field in forms.transport %}
149
    <tr><td class="width-limited">{{ field.label_tag  }}</td><td>{{ field }}
150
    <button type="button"
151
      class="dialog-button"
152
      data-url="../../ressources/{{ field.name }}/new/ #form-content"
153
      data-default-button="Ajouter"
154
      data-next-url="{{ request.get_full_path }}#tab=1"
155
      data-add-select="#id_transport-{{ field.name }}"
156
      title="Ajouter {% if field.label.lower == "type de transport" %}un{% else %}une{% endif %} {{ field.label.lower }}">+</button></td><td>{{ field.errors }}</td></tr>
157
    {% endfor %}
158
    </tbody>
159
    </table>
160
    <br/>
161
    <table>
162
      <tr>
163
        <td><!--<button id="attestation-transport-btn">Attestation de transport</button>--></td><td><button id="prescription-transport-btn">Prescription de transport</button></td>
164
      </tr>
165
      <tr>
166
        <td></td>
167
        <td>{% if last_prescription %} Dernière prescription le {{ last_prescription.created }}{% endif %}</td>
168
      </tr>
169
    </table>
146
      <table class="basic">
147
        <tbody>
148
        {% for field in forms.transport %}
149
        <tr><td class="width-limited">{{ field.label_tag }}</td><td>{{ field }}
150
            <button type="button"
151
              class="dialog-button"
152
              data-url="../../ressources/{{ field.name }}/new/ #form-content"
153
              data-default-button="Ajouter"
154
              data-next-url="{{ request.get_full_path }}#tab=1"
155
              data-add-select="#id_transport-{{ field.name }}"
156
              title="Ajouter {% if field.label.lower == "type de transport" %}un{% else %}une{% endif %} {{ field.label.lower }}">+</button></td><td>{{ field.errors }}</td></tr>
157
        {% endfor %}
158
        </tbody>
159
      </table>
160
      <br/>
161
      <table>
162
        <tr>
163
          <td><!--<button id="attestation-transport-btn">Attestation de transport</button>--></td><td><button id="prescription-transport-btn">Prescription de transport</button></td>
164
        </tr>
165
        <tr>
166
          <td></td>
167
          <td>{% if last_prescription %} Dernière prescription le {{ last_prescription.created }}{% endif %}</td>
168
        </tr>
169
      </table>
170 170
    </div>
171 171
  </form>
172 172

  
173
  <form method="post" id="followup-form" class="patientrecordform">{% csrf_token %}
173
  <form method="post" action="tab2" id="followup-form" class="patientrecordform">{% csrf_token %}
174 174
    <div class="frame inline">
175 175
      <h3>Suivi du patient</h3>
176 176
      <button class="save">✔</button>
177
    <table class="basic">
178
    <tbody>
179
    <tr><td class="width-limited">{{ forms.followup.coordinators.label_tag  }}</td><td>{{ forms.followup.coordinators }}</td><td>{{ forms.followup.coordinators.errors }}</td></tr>
180
    <tr><td class="width-limited">{{ forms.followup.externaldoctor.label_tag  }}</td><td>{{ forms.followup.externaldoctor }}
181
    <button type="button"
182
      class="dialog-button"
183
      data-url="../../personnes/externaltherapist/new/ #form-content"
184
      data-default-button="Ajouter"
185
      data-next-url="{{ request.get_full_path }}#tab=1"
186
      data-add-select="#id_followup-externaldoctor"
187
      title="Ajouter un médecin extérieur">+</button></td><td>{{ forms.followup.externaldoctor.errors }}</td></tr>
188
    <tr><td class="width-limited">{{ forms.followup.externalintervener.label_tag  }}</td><td>{{ forms.followup.externalintervener }}
189
    <button type="button"
190
      class="dialog-button"
191
      data-url="../../personnes/externalworker/new/ #form-content"
192
      data-default-button="Ajouter"
193
      data-next-url="{{ request.get_full_path }}#tab=1"
194
      data-add-select="#id_followup-externalintervener"
195
      title="Ajouter un intervenant extérieur">+</button></td><td>{{ forms.followup.externalintervener.errors }}</td></tr>
196
    </tbody>
197
    </table>
177
      <table class="basic">
178
        <tbody>
179
        <tr><td class="width-limited">{{ forms.followup.coordinators.label_tag  }}</td><td>{{ forms.followup.coordinators }}</td><td>{{ forms.followup.coordinators.errors }}</td></tr>
180
        <tr><td class="width-limited">{{ forms.followup.externaldoctor.label_tag  }}</td><td>{{ forms.followup.externaldoctor }}
181
            <button type="button"
182
              class="dialog-button"
183
              data-url="../../personnes/externaltherapist/new/ #form-content"
184
              data-default-button="Ajouter"
185
              data-next-url="{{ request.get_full_path }}#tab=1"
186
              data-add-select="#id_followup-externaldoctor"
187
              title="Ajouter un médecin extérieur">+</button></td><td>{{ forms.followup.externaldoctor.errors }}</td></tr>
188
        <tr><td class="width-limited">{{ forms.followup.externalintervener.label_tag  }}</td><td>{{ forms.followup.externalintervener }}
189
            <button type="button"
190
              class="dialog-button"
191
              data-url="../../personnes/externalworker/new/ #form-content"
192
              data-default-button="Ajouter"
193
              data-next-url="{{ request.get_full_path }}#tab=1"
194
              data-add-select="#id_followup-externalintervener"
195
              title="Ajouter un intervenant extérieur">+</button></td><td>{{ forms.followup.externalintervener.errors }}</td></tr>
196
        </tbody>
197
      </table>
198 198
    </div>
199
      <input type="hidden"  name="tab"  value="1">
199
    <input type="hidden"  name="tab"  value="1">
200 200
  </form>
201 201

  
202
<div class="frame">
202
  <div class="frame">
203 203
    <h3>Mesures de protection</h3>
204 204
    <p><button id="new-protection-btn">Nouvelle mesure de protection</button></p>
205 205
    {% for protection in object.protectionstate_set.all %}
206
        <div class="subframe">
207
        Depuis le {{ protection.start_date }} : {{ protection.status.name }}
208
        <div class="buttons">
209
            <button type="button" data-id="{{ protection.id }}" class="del-protection icon-minus" title="Supprimer"></button>
210
            <button type="button" data-id="{{ protection.id }}" class="update-protection-btn icon-edit" title="Modifier"></button>
211
        </div>
212
        <div>
213
            <ul>
214
                {% if protection.end_date %}<li><label>Date de fin</label> : {{ protection.end_date }}</li>{% endif %}
215
                {% if protection.comment %}<li><label>Commentaire</label> : {{ protection.comment }}</li>{% endif %}
216
            </ul>
217
        </div>
218
        </div>
206
    <div class="subframe">
207
      Depuis le {{ protection.start_date }} : {{ protection.status.name }}
208
      <div class="buttons">
209
        <button type="button" data-id="{{ protection.id }}" class="del-protection icon-minus" title="Supprimer"></button>
210
        <button type="button" data-id="{{ protection.id }}" class="update-protection-btn icon-edit" title="Modifier"></button>
211
      </div>
212
      <div>
213
        <ul>
214
          {% if protection.end_date %}<li><label>Date de fin</label> : {{ protection.end_date }}</li>{% endif %}
215
          {% if protection.comment %}<li><label>Commentaire</label> : {{ protection.comment }}</li>{% endif %}
216
        </ul>
217
      </div>
218
    </div>
219 219
    {% endfor %}
220
  </div>
220 221
</div>
calebasse/dossiers/templates/dossiers/patientrecord_tab3_adresses.html
1
<form method="post" id="policyholder-form" class="patientrecordform">{% csrf_token %}
1
<div id="tabs-3">
2
  <form method="post" action="tab3" id="policyholder-form" class="patientrecordform">{% csrf_token %}
2 3

  
3
        <div class="contact patient">
4
            <h4>{{ object.first_name }} <span class="lastname">{{ object.last_name }}</span> (Patient)</h4>
5
            {% if nb_place_of_lifes > 1 %}
6
            <p>{{ nb_place_of_lifes }} lieux de vie</p>
7
            {% endif %}
8
            <div class="right">Assuré
9
                <input type="radio"
10
                {% if object.policyholder.id == object.id %} checked="checked" {% endif %}
11
                id="id_policyholder-policyholder_{{ object.id }}"
12
                value="{{ object.id }}"
13
                class="policyholder-radio"
14
                name="policyholder-policyholder">
15
                <button type="button" data-id="{{ object.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
16
            </div>
17
            <div>
18
              {% include "dossiers/patientrecord_tab3_contact.html" with contact=object %}
19
            <hr>
20
            <span>
21
                <label>Commentaire </label> <button class="save enable-on-change btn-maj">✔</button><br/>
22
                {{ forms.policyholder.contact_comment }}
23
            </span>
24
        </div>
4
    <div class="contact patient">
5
      <h4>{{ object.first_name }} <span class="lastname">{{ object.last_name }}</span> (Patient)</h4>
6
      {% if nb_place_of_lifes > 1 %}
7
      <p>{{ nb_place_of_lifes }} lieux de vie</p>
8
      {% endif %}
9
      <div class="right">Assuré
10
        <input type="radio"
11
        {% if object.policyholder.id == object.id %} checked="checked" {% endif %}
12
        id="id_policyholder-policyholder_{{ object.id }}"
13
        value="{{ object.id }}"
14
        class="policyholder-radio"
15
        name="policyholder-policyholder">
16
        <button type="button" data-id="{{ object.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
17
      </div>
18
      <div>
19
        {% include "dossiers/patientrecord_tab3_contact.html" with contact=object %}
20
        <hr>
21
        <span>
22
          <label>Commentaire </label> <button class="save enable-on-change btn-maj">✔</button><br/>
23
          {{ forms.policyholder.contact_comment }}
24
        </span>
25
      </div>
25 26
    </div>
26 27

  
27
<button type="button" id="new-address-btn">Nouvelle adresse</button>
28
<button type="button" id="new-contact-btn">Nouveau contact</button>
28
    <button type="button" id="new-address-btn">Nouvelle adresse</button>
29
    <button type="button" id="new-contact-btn">Nouveau contact</button>
29 30

  
30
{% for contact in object.contacts.all %}
31
    {% for contact in object.contacts.all %}
31 32
    {% if not contact.addresses.all %}
32 33
    <div class="contact">
33
        <h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
34
            {{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
35
        <div class="right">Assuré
36
            <input type="radio"
37
            {% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
38
            id="id_policyholder-policyholder_{{ contact.id }}"
39
            value="{{ contact.id }}"
40
            class="policyholder-radio"
41
            name="policyholder-policyholder">
42
            <button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
43
            <button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
44
        </div>
45
        <div>
46
          {% include "dossiers/patientrecord_tab3_contact.html" %}
47
        </div>
34
      <h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
35
        {{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
36
      <div class="right">Assuré
37
        <input type="radio"
38
        {% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
39
        id="id_policyholder-policyholder_{{ contact.id }}"
40
        value="{{ contact.id }}"
41
        class="policyholder-radio"
42
        name="policyholder-policyholder">
43
        <button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
44
        <button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
45
      </div>
46
      <div>
47
        {% include "dossiers/patientrecord_tab3_contact.html" %}
48 48
      </div>
49
        {% endif %}
49
    </div>
50
    {% endif %}
50 51
    {% endfor %}
51 52
    {% for address in addresses %}
52 53
    <div class="frame {% if address.place_of_life %}orange{% endif %}">
53
        <h3>{{ address }}</h3>
54
        <div class="buttons">
55
            <button type="button" data-id="{{ address.id }}" class="del-address icon-minus" title="Supprimer"></button>
56
            <button type="button" data-id="{{ address.id }}" class="update-address-btn icon-edit" title="Modifier"></button>
54
      <h3>{{ address }}</h3>
55
      <div class="buttons">
56
        <button type="button" data-id="{{ address.id }}" class="del-address icon-minus" title="Supprimer"></button>
57
        <button type="button" data-id="{{ address.id }}" class="update-address-btn icon-edit" title="Modifier"></button>
58
      </div>
59
      <div class="right">
60
        <ul class="ajax_messages" style="display: none;"></ul>
61
        <input type="checkbox" data-id="{{ address.id }}" class="place_of_life" {% if address.place_of_life %}checked{% endif %}>Lieu de vie</input>
62
      </div>
63
      {% if address.phone %}<p><span class="icon-home-space">{{ address.phone }}</span></p>{% endif %}
64
      {% if address.comment %}<p><label>Commentaire :</label>{{ address.comment }}</p>{% endif %}
65
      {% if not address.phone and not address.comment %}<p>&nbsp;<!-- intentionaly empty --></p>{% endif %}
66
      {% for contact in address.patientcontact_set.all  %}
67
      {% if contact.id != object.id %}
68
      <div class="contact">
69
        <h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
70
          {{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
71
        <div class="right">Assuré
72
          <input type="radio"
73
          {% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
74
          id="id_policyholder-policyholder_{{ contact.id }}"
75
          value="{{ contact.id }}"
76
          class="policyholder-radio"
77
          name="policyholder-policyholder">
78
          <button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
79
          <button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
57 80
        </div>
58
        <div class="right">
59
            <ul class="ajax_messages" style="display: none;"></ul>
60
            <input type="checkbox" data-id="{{ address.id }}" class="place_of_life" {% if address.place_of_life %}checked{% endif %}>Lieu de vie</input>
81
        <div>
82
          {% include "dossiers/patientrecord_tab3_contact.html" %}
61 83
        </div>
62
        {% if address.phone %}<p><span class="icon-home-space">{{ address.phone }}</span></p>{% endif %}
63
        {% if address.comment %}<p><label>Commentaire :</label>{{ address.comment }}</p>{% endif %}
64
        {% if not address.phone and not address.comment %}<p>&nbsp;<!-- intentionaly empty --></p>{% endif %}
65
        {% for contact in address.patientcontact_set.all  %}
66
        {% if contact.id != object.id %}
67
        <div class="contact">
68
            <h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
69
                {{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
70
            <div class="right">Assuré
71
                <input type="radio"
72
                {% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
73
                id="id_policyholder-policyholder_{{ contact.id }}"
74
                value="{{ contact.id }}"
75
                class="policyholder-radio"
76
                name="policyholder-policyholder">
77
                <button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
78
                <button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
79
            </div>
80
            <div>
81
              {% include "dossiers/patientrecord_tab3_contact.html" %}
82
            </div>
83
          </ul>
84
        </span>
85
      </div>
86
      {% endif %}
87
      {% endfor %}
88
    </div>
89
    {% endfor %}
84
      </ul>
85
    </span>
86
  </div>
87
  {% endif %}
88
  {% endfor %}
89
</div>
90
{% endfor %}
90 91
  </form>
91

  
92
</div>
calebasse/dossiers/templates/dossiers/patientrecord_tab4_notifs.html
1
{% if object.service.name == "CMPP" %}
2
<div class="notifs">
3
  <h4>Information sur la prise en charge</h4>
4
  <ul>
5
    <li><span{% if hc_status.1 %} id="highlight"{% endif %}>{{ hc_status.0 }}</span></li>
6
    {% if object.pause %}<li><span id="highlight">Le dossier est en pause facturation.</span></li>{% endif %}
7
    {% if missing_policy %}<li><span id="highlight">Informations d'assuré sociale manquantes.</span></li>{% endif %}
8
    {% if missing_birthdate %}<li><span id="highlight">Date de naissance manquante.</span></li>{% endif %}
9
    {% if object.policyholder.ame %}<li><span id="highlight">Le contact assuré est AME.</span></li>{% endif %}
10
  </div>
11
  <p>
12
  <button id="new-hcdiag-btn">Nouvelle PC diagnostic</button>
13
  <button id="new-hctrait-btn">Nouvelle PC traitement</button>
14
  </p>
15
  {% if acts_losts %}
16
  <p><strong>{{ acts_losts|length }}</strong> actes facturables qui ne peuvent pas être facturés :
17
  <table class="basic">
18
    <thead>
19
      <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
20
    </thead>
21
    <tbody>
22
    {% for act in acts_losts %}
23
    <tr>
24
      <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
25
      <td>{{ act.time }}</td>
26
      <td>{{ act.act_type }}</td>
27
      <td>{% for participant in act.doctors.all %}
28
        {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
29
        {% endfor %}</td>
30
      <td>{{ act.comment|default_if_none:"" }}</td>
31
      <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
32
    </tr>
33
    {% endfor %}
34
    </tbody>
35
  </table>
36
  </p>
37
  {% endif %}
38
  {% if acts_pause %}
39
  <p><strong>{{ acts_pause|length }}</strong> actes qui sont en pause :
40
  <table class="basic">
41
    <thead>
42
      <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
43
    </thead>
44
    <tbody>
45
    {% for act in acts_pause %}
46
    <tr>
47
      <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
48
      <td>{{ act.time }}</td>
49
      <td>{{ act.act_type }}</td>
50
      <td>{% for participant in act.doctors.all %}
51
        {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
52
        {% endfor %}</td>
53
      <td>{{ act.comment|default_if_none:"" }}</td>
54
      <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
55
    </tr>
56
    {% endfor %}
57
    </tbody>
58
  </table>
59
  </p>
60
  {% endif %}
61
  {% if hcs %}
62
  {% for hc, acts, acts_cared in hcs %}
63
  {% if hc.cmpphealthcarediagnostic %}
64
  <div id="patient-diag">
65
    <div class="frame">
66
      <div class="buttons">
67
        <button type="button" data-id="{{ hc.id }}" class="del-hcdiag icon-minus" title="Supprimer"></button>
68
        <button type="button" data-id="{{ hc.id }}" class="update-hcdiag-btn icon-edit" title="Modifier"></button>
69
      </div>
70
      <h3>Prise en charge de diagnostic, débutée le {{ hc.start_date|date:"d/m/Y" }}{% if hc.cmpphealthcarediagnostic.end_date %}, se terminant le {{ hc.cmpphealthcarediagnostic.end_date|date:"d/m/Y" }}{% endif %}</h3>
71
      <ul>
72
        {% if hc.cmpphealthcarediagnostic.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcarediagnostic.end_date|date:"d/m/Y" }}</li>{% endif %}
73
        {% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
74
        {% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
75
        <li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcarediagnostic.get_act_number }}</strong></li>
76
        {% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
77
        <table class="basic">
78
          <thead>
79
            <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
80
          </thead>
81
          <tbody>
82
          {% for act in acts %}
83
          <tr>
84
            <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
85
            <td>{{ act.time }}</td>
86
            <td>{{ act.act_type }}</td>
87
            <td>{% for participant in act.doctors.all %}
88
              {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
89
              {% endfor %}</td>
90
            <td>{{ act.comment|default_if_none:"" }}</td>
91
            <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
92
          </tr>
93
          {% endfor %}
94
          </tbody>
95
        </table>
96
        {% endif %}
97
        {% if hc.get_nb_acts_cared %}
98
        <li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
99
        <table class="basic">
100
          <thead>
101
            <tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
102
          </thead>
103
          <tbody>
104
          {% for act in acts_cared %}
105
          <tr>
106
            <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
107
            <td>{{ act.time }}</td>
108
            <td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
109
            <td>{{ act.act_type }}</td>
110
            <td>{% for participant in act.doctors.all %}
111
              {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
112
              {% endfor %}</td>
113
            <td>{{ act.comment|default_if_none:"" }}</td>
114
          </tr>
115
          {% endfor %}
116
          </tbody>
117
        </table>
118
        {% else %}<li>Aucun acte facturé.</li>
119
        {% endif %}
120
      </ul>
1
<div id="tabs-4">
2
  {% if object.service.slug == "cmpp" %}
3
  <div class="notifs">
4
    <h4>Information sur la prise en charge</h4>
5
    <ul>
6
      <li><span{% if hc_status.1 %} id="highlight"{% endif %}>{{ hc_status.0 }}</span></li>
7
      {% if object.pause %}<li><span id="highlight">Le dossier est en pause facturation.</span></li>{% endif %}
8
      {% if missing_policy %}<li><span id="highlight">Informations d'assuré sociale manquantes.</span></li>{% endif %}
9
      {% if missing_birthdate %}<li><span id="highlight">Date de naissance manquante.</span></li>{% endif %}
10
      {% if object.policyholder.ame %}<li><span id="highlight">Le contact assuré est AME.</span></li>{% endif %}
121 11
    </div>
122
  </div>
123
  {% else %}
124
  <div id="patient-traitement">
125
    <div class="frame">
126
      <div class="buttons">
127
        <button type="button" data-id="{{ hc.id }}" class="del-hctrait icon-minus" title="Supprimer"></button>
128
        <button type="button" data-id="{{ hc.id }}" class="update-hctrait-btn icon-edit" title="Modifier"></button>
12
    <p>
13
    <button id="new-hcdiag-btn">Nouvelle PC diagnostic</button>
14
    <button id="new-hctrait-btn">Nouvelle PC traitement</button>
15
    </p>
16
    {% if acts_losts %}
17
    <p><strong>{{ acts_losts|length }}</strong> actes facturables qui ne peuvent pas être facturés :
18
    <table class="basic">
19
      <thead>
20
        <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
21
      </thead>
22
      <tbody>
23
      {% for act in acts_losts %}
24
      <tr>
25
        <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
26
        <td>{{ act.time }}</td>
27
        <td>{{ act.act_type }}</td>
28
        <td>{% for participant in act.doctors.all %}
29
          {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
30
          {% endfor %}</td>
31
        <td>{{ act.comment|default_if_none:"" }}</td>
32
        <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
33
      </tr>
34
      {% endfor %}
35
      </tbody>
36
    </table>
37
    </p>
38
    {% endif %}
39
    {% if acts_pause %}
40
    <p><strong>{{ acts_pause|length }}</strong> actes qui sont en pause :
41
    <table class="basic">
42
      <thead>
43
        <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
44
      </thead>
45
      <tbody>
46
      {% for act in acts_pause %}
47
      <tr>
48
        <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
49
        <td>{{ act.time }}</td>
50
        <td>{{ act.act_type }}</td>
51
        <td>{% for participant in act.doctors.all %}
52
          {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
53
          {% endfor %}</td>
54
        <td>{{ act.comment|default_if_none:"" }}</td>
55
        <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
56
      </tr>
57
      {% endfor %}
58
      </tbody>
59
    </table>
60
    </p>
61
    {% endif %}
62
    {% if hcs %}
63
    {% for hc, acts, acts_cared in hcs %}
64
    {% if hc.cmpphealthcarediagnostic %}
65
    <div id="patient-diag">
66
      <div class="frame">
67
        <div class="buttons">
68
          <button type="button" data-id="{{ hc.id }}" class="del-hcdiag icon-minus" title="Supprimer"></button>
69
          <button type="button" data-id="{{ hc.id }}" class="update-hcdiag-btn icon-edit" title="Modifier"></button>
70
        </div>
71
        <h3>Prise en charge de diagnostic, débutée le {{ hc.start_date|date:"d/m/Y" }}{% if hc.cmpphealthcarediagnostic.end_date %}, se terminant le {{ hc.cmpphealthcarediagnostic.end_date|date:"d/m/Y" }}{% endif %}</h3>
72
        <ul>
73
          {% if hc.cmpphealthcarediagnostic.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcarediagnostic.end_date|date:"d/m/Y" }}</li>{% endif %}
74
          {% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
75
          {% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
76
          <li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcarediagnostic.get_act_number }}</strong></li>
77
          {% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
78
          <table class="basic">
79
            <thead>
80
              <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
81
            </thead>
82
            <tbody>
83
            {% for act in acts %}
84
            <tr>
85
              <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
86
              <td>{{ act.time }}</td>
87
              <td>{{ act.act_type }}</td>
88
              <td>{% for participant in act.doctors.all %}
89
                {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
90
                {% endfor %}</td>
91
              <td>{{ act.comment|default_if_none:"" }}</td>
92
              <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
93
            </tr>
94
            {% endfor %}
95
            </tbody>
96
          </table>
97
          {% endif %}
98
          {% if hc.get_nb_acts_cared %}
99
          <li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
100
          <table class="basic">
101
            <thead>
102
              <tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
103
            </thead>
104
            <tbody>
105
            {% for act in acts_cared %}
106
            <tr>
107
              <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
108
              <td>{{ act.time }}</td>
109
              <td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
110
              <td>{{ act.act_type }}</td>
111
              <td>{% for participant in act.doctors.all %}
112
                {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
113
                {% endfor %}</td>
114
              <td>{{ act.comment|default_if_none:"" }}</td>
115
            </tr>
116
            {% endfor %}
117
            </tbody>
118
          </table>
119
          {% else %}<li>Aucun acte facturé.</li>
120
          {% endif %}
121
        </ul>
129 122
      </div>
130
      <h3>Prise en charge de traitement, débutée le {{ hc.start_date|date:"d/m/Y" }}{% if hc.cmpphealthcaretreatment.end_date %}, se terminant le {{ hc.cmpphealthcaretreatment.end_date|date:"d/m/Y" }}{% endif %}</h3>
131
      <ul>
132
        {% if hc.cmpphealthcaretreatment.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcaretreatment.end_date|date:"d/m/Y" }}</li>{% endif %}
133
        {% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
134
        {% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
135
        <li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcaretreatment.get_act_number }}</strong></li>
136
        {% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
137
        <table class="basic">
138
          <thead>
139
            <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
140
          </thead>
141
          <tbody>
142
          {% for act in acts %}
143
          <tr>
144
            <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
145
            <td>{{ act.time }}</td>
146
            <td>{{ act.act_type }}</td>
147
            <td>{% for participant in act.doctors.all %}
148
              {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
149
              {% endfor %}</td>
150
            <td>{{ act.comment|default_if_none:"" }}</td>
151
            <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
152
          </tr>
153
          {% endfor %}
154
          </tbody>
155
        </table>
123
    </div>
124
    {% else %}
125
    <div id="patient-traitement">
126
      <div class="frame">
127
        <div class="buttons">
128
          <button type="button" data-id="{{ hc.id }}" class="del-hctrait icon-minus" title="Supprimer"></button>
129
          <button type="button" data-id="{{ hc.id }}" class="update-hctrait-btn icon-edit" title="Modifier"></button>
130
        </div>
131
        <h3>Prise en charge de traitement, débutée le {{ hc.start_date|date:"d/m/Y" }}{% if hc.cmpphealthcaretreatment.end_date %}, se terminant le {{ hc.cmpphealthcaretreatment.end_date|date:"d/m/Y" }}{% endif %}</h3>
132
        <ul>
133
          {% if hc.cmpphealthcaretreatment.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcaretreatment.end_date|date:"d/m/Y" }}</li>{% endif %}
134
          {% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
135
          {% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
136
          <li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcaretreatment.get_act_number }}</strong></li>
137
          {% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
138
          <table class="basic">
139
            <thead>
140
              <tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
141
            </thead>
142
            <tbody>
143
            {% for act in acts %}
144
            <tr>
145
              <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
146
              <td>{{ act.time }}</td>
147
              <td>{{ act.act_type }}</td>
148
              <td>{% for participant in act.doctors.all %}
149
                {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
150
                {% endfor %}</td>
151
              <td>{{ act.comment|default_if_none:"" }}</td>
152
              <td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
153
            </tr>
154
            {% endfor %}
155
            </tbody>
156
          </table>
156 157

  
157
        {% endif %}
158
        {% if hc.get_nb_acts_cared %}
159
        <li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
160
        <table class="basic">
161
          <thead>
162
            <tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
163
          </thead>
164
          <tbody>
165
          {% for act in acts_cared %}
166
          <tr>
167
            <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
168
            <td>{{ act.time }}</td>
169
            <td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
170
            <td>{{ act.act_type }}</td>
171
            <td>{% for participant in act.doctors.all %}
172
              {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
173
              {% endfor %}</td>
174
            <td>{{ act.comment|default_if_none:"" }}</td>
175
          </tr>
176
          {% endfor %}
177
          </tbody>
178
        </table>
179
        {% else %}<li>Aucun acte facturé.</li>
180
        {% endif %}
181
      </ul>
158
          {% endif %}
159
          {% if hc.get_nb_acts_cared %}
160
          <li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
161
          <table class="basic">
162
            <thead>
163
              <tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
164
            </thead>
165
            <tbody>
166
            {% for act in acts_cared %}
167
            <tr>
168
              <td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
169
              <td>{{ act.time }}</td>
170
              <td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
171
              <td>{{ act.act_type }}</td>
172
              <td>{% for participant in act.doctors.all %}
173
                {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
174
                {% endfor %}</td>
175
              <td>{{ act.comment|default_if_none:"" }}</td>
176
            </tr>
177
            {% endfor %}
178
            </tbody>
179
          </table>
180
          {% else %}<li>Aucun acte facturé.</li>
181
          {% endif %}
182
        </ul>
183
      </div>
182 184
    </div>
183
  </div>
184
  {% endif %}
185
  {% endfor %}
186
  {% endif %}
187
  {% endif %}
188
  {% if object.service.name == "SESSAD TED" or object.service.name == "SESSAD DYS" %}
189
  <p>
190
  <button id="new-notification-btn">Nouvelle notification</button>
191
  </p>
192
  {% if hcs %}
193
  {% for hc in hcs %}
194
  {% if hc.sessadhealthcarenotification %}
195
  <div id="patient-diag">
196
    <div class="frame">
197
      <div class="buttons">
198
        <button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="del-notification icon-minus" title="Supprimer"></button>
199
        <button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="update-notification-btn icon-edit" title="Modifier"></button>
185
    {% endif %}
186
    {% endfor %}
187
    {% endif %}
188
    {% endif %}
189
    {% if object.service.slug == "sessad-ted" or object.service.slug == "sessad-dys" %}
190
    <p>
191
    <button id="new-notification-btn">Nouvelle notification</button>
192
    </p>
193
    {% if hcs %}
194
    {% for hc in hcs %}
195
    {% if hc.sessadhealthcarenotification %}
196
    <div id="patient-diag">
197
      <div class="frame">
198
        <div class="buttons">
199
          <button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="del-notification icon-minus" title="Supprimer"></button>
200
          <button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="update-notification-btn icon-edit" title="Modifier"></button>
201
        </div>
202
        <h3>Notification</h3>
203
        <ul>
204
          {% if hc.start_date %}<li><label>Date de début</label> : {{ hc.start_date|date:"d/m/Y" }}</li>{% endif %}
205
          {% if hc.sessadhealthcarenotification.end_date %}<li><label>Date de fin</label> : {{ hc.sessadhealthcarenotification.end_date|date:"d/m/Y" }}</li>{% endif %}
206
          {% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
207
          {% if hc.agree_date %}<li><label>Date d'accord</label> : {{ hc.agree_date|date:"d/m/Y" }}</li>{% endif %}
208
          {% if hc.insist_date %}<li><label>Date de relance</label> : {{ hc.insist_date|date:"d/m/Y" }}</li>{% endif %}
209
          {% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
210
        </ul>
200 211
      </div>
201
      <h3>Notification</h3>
202
      <ul>
203
        {% if hc.start_date %}<li><label>Date de début</label> : {{ hc.start_date|date:"d/m/Y" }}</li>{% endif %}
204
        {% if hc.sessadhealthcarenotification.end_date %}<li><label>Date de fin</label> : {{ hc.sessadhealthcarenotification.end_date|date:"d/m/Y" }}</li>{% endif %}
205
        {% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
206
        {% if hc.agree_date %}<li><label>Date d'accord</label> : {{ hc.agree_date|date:"d/m/Y" }}</li>{% endif %}
207
        {% if hc.insist_date %}<li><label>Date de relance</label> : {{ hc.insist_date|date:"d/m/Y" }}</li>{% endif %}
208
        {% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
209
      </ul>
210 212
    </div>
213
    {% endif %}
214
    {% endfor %}
215
    {% endif %}
216
    {% endif %}
211 217
  </div>
212
  {% endif %}
213
  {% endfor %}
214
  {% endif %}
215
  {% endif %}
calebasse/dossiers/templates/dossiers/patientrecord_tab5_actes_passes.html
1
{% for state, last_rdvs in history %}
2
<div class="frame">
3
  <h3>{{ state.status.name }} depuis le {{ state.date_selected|date:"SHORT_DATE_FORMAT" }}</h3>
4
  {% if last_rdvs %}
5
  <table class="basic">
6
    <thead>
7
      <tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
8
    </thead>
9
    <tbody>
10
    {% for act, state, missing_workers in last_rdvs %}
11
    <tr>
12
      <td>{{ act.date|date:"SHORT_DATE_FORMAT" }} {{ act.time|date:"H:i" }}{% if missing_workers %} <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>{% endif %}</td>
13
      <td>{% if state %}{% if act.is_absent %}<strong>{% endif %}{% if state.state_name == 'ACT_DOUBLE' or state.state_name == 'ACT_LOST' %}Présent ({{ state }}){% else %}{{ state }}{% endif %}{% if act.is_absent %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td>
14
      <td>{{ act.act_type }}</td>
15
      <td class="width-limited">{% for doctor in act.doctors.all %}
16
        {% if doctor in missing_workers %}<span class="absent" title="Absent">{% endif %}
17
          {{ doctor.first_name }} <span class="lastname">{{ doctor.last_name }}</span>
18
          {% if doctor in missing_workers %}</span>{% endif %}
19
        {% endfor %}</td>
20
      <td class="width-limited">{% if act.comment %}{{ act.comment }}{% endif %}</td>
21
    </tr>
22
    {% endfor %}
23
    </tbody>
24
  </table>
25
  {% endif %}
1
<div id="tabs-5">
2
  {% for state, last_rdvs in history %}
3
  <div class="frame">
4
    <h3>{{ state.status.name }} depuis le {{ state.date_selected|date:"SHORT_DATE_FORMAT" }}</h3>
5
    {% if last_rdvs %}
6
    <table class="basic">
7
      <thead>
8
        <tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
9
      </thead>
10
      <tbody>
11
      {% for act, state, missing_workers in last_rdvs %}
12
      <tr>
13
        <td>{{ act.date|date:"SHORT_DATE_FORMAT" }} {{ act.time|date:"H:i" }}{% if missing_workers %} <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>{% endif %}</td>
14
        <td>{% if state %}{% if act.is_absent %}<strong>{% endif %}{% if state.state_name == 'ACT_DOUBLE' or state.state_name == 'ACT_LOST' %}Présent ({{ state }}){% else %}{{ state }}{% endif %}{% if act.is_absent %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td>
15
        <td>{{ act.act_type }}</td>
16
        <td class="width-limited">{% for doctor in act.doctors.all %}
17
          {% if doctor in missing_workers %}<span class="absent" title="Absent">{% endif %}
18
            {{ doctor.first_name }} <span class="lastname">{{ doctor.last_name }}</span>
19
            {% if doctor in missing_workers %}</span>{% endif %}
20
          {% endfor %}</td>
21
        <td class="width-limited">{% if act.comment %}{{ act.comment }}{% endif %}</td>
22
      </tr>
23
      {% endfor %}
24
      </tbody>
25
    </table>
26
    {% endif %}
27
  </div>
28
  {% endfor %}
26 29
</div>
27
{% endfor %}
calebasse/dossiers/templates/dossiers/patientrecord_tab6_next_rdv.html
1
<table class="basic">
2
  <thead>
3
    <tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> </tr>
4
  </thead>
5
  <tbody>
6
  {% for event, state, missing_participants in next_rdvs %}
7
  <tr>
8
    <td>{% firstof event.start_datetime|date:"l d/m/y H:i"|title %}{% if missing_participants %} <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>{% endif %}</td>
9
    <td>{% if state %}{% if state.state_name != 'VALIDE' %}<strong>{% endif %}{{ state }}{% if state.state_name != 'VALIDE' %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td>
10
    <td>{{ event.act_type }}</td>
11
    <td class="width-limited">{% for participant in event.participants.all %}
12
      {% if participant in missing_participants %}<span class="absent" title="Absent">{% endif %}
13
        {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
14
        {% if participant in missing_participants %}</span>{% endif %}
15
      {% endfor %}</td>
16
    {% if event.act.id %}
17
    <td class="width-limited">{{ event.act.comment }}</td>
18
    {% else %}
19
    <td class="width-limited">{{ event.description }}</td>
20
    {% endif %}
21
  </tr>
22
  {% endfor %}
23
  </tbody>
24
</table>
1
<div id="tabs-6">
2
  <table class="basic">
3
    <thead>
4
      <tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> </tr>
5
    </thead>
6
    <tbody>
7
    {% for event, state, missing_participants in next_rdvs %}
8
    <tr>
9
      <td>{% firstof event.start_datetime|date:"l d/m/y H:i"|title %}{% if missing_participants %} <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>{% endif %}</td>
10
      <td>{% if state %}{% if state.state_name != 'VALIDE' %}<strong>{% endif %}{{ state }}{% if state.state_name != 'VALIDE' %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td>
11
      <td>{{ event.act_type }}</td>
12
      <td class="width-limited">{% for participant in event.participants.all %}
13
        {% if participant in missing_participants %}<span class="absent" title="Absent">{% endif %}
14
          {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
15
          {% if participant in missing_participants %}</span>{% endif %}
16
        {% endfor %}</td>
17
      {% if event.act.id %}
18
      <td class="width-limited">{{ event.act.comment }}</td>
19
      {% else %}
20
      <td class="width-limited">{{ event.description }}</td>
21
      {% endif %}
22
    </tr>
23
    {% endfor %}
24
    </tbody>
25
  </table>
26
</div>
calebasse/dossiers/templates/dossiers/patientrecord_tab7_socialisation.html
1
<div class="frame">
2
  <h3>Périodes de socialisation</h3>
3
  <p><button id="new-socialisation-duration-btn">Nouvelle période de socialisation</button></p>
4
  {% for duration in object.socialisation_durations.all %}
5
  <div class="subframe">
6
    Arrivée le <strong>{{ duration.start_date }}</strong> dans {% if duration.school %}l'établissement <strong>{{ duration.school }}</strong>{% else %}un établissement non renseigné{% endif %}{% if duration.level %} (en {{ duration.level }}){% endif %}
7
    <div class="buttons">
8
      <button type="button" data-id="{{ duration.id }}" class="del-duration icon-minus" title="Supprimer"></button>
9
      <button type="button" data-id="{{ duration.id }}" class="update-duration-btn icon-edit" title="Modifier"></button>
10
    </div>
11
    <div>
12
      <ul>
13
        {% if duration.end_date %}<li><label>Date de départ</label> : {{ duration.end_date }}</li>{% endif %}
14
        {% if duration.comment %}<li><label>Commentaire</label> : {{ duration.comment }}</li>{% endif %}
15
      </ul>
1
<div id="tabs-7">
2
  <div class="frame">
3
    <h3>Périodes de socialisation</h3>
4
    <p><button id="new-socialisation-duration-btn">Nouvelle période de socialisation</button></p>
5
    {% for duration in object.socialisation_durations.all %}
6
    <div class="subframe">
7
      Arrivée le <strong>{{ duration.start_date }}</strong> dans {% if duration.school %}l'établissement <strong>{{ duration.school }}</strong>{% else %}un établissement non renseigné{% endif %}{% if duration.level %} (en {{ duration.level }}){% endif %}
8
      <div class="buttons">
9
        <button type="button" data-id="{{ duration.id }}" class="del-duration icon-minus" title="Supprimer"></button>
10
        <button type="button" data-id="{{ duration.id }}" class="update-duration-btn icon-edit" title="Modifier"></button>
11
      </div>
12
      <div>
13
        <ul>
14
          {% if duration.end_date %}<li><label>Date de départ</label> : {{ duration.end_date }}</li>{% endif %}
15
          {% if duration.comment %}<li><label>Commentaire</label> : {{ duration.comment }}</li>{% endif %}
16
        </ul>
17
      </div>
16 18
    </div>
19
    {% endfor %}
17 20
  </div>
18
  {% endfor %}
19
</div>
20 21

  
21
<div class="frame">
22
  <h3>Demandes MDPH</h3>
23
  <p><button id="new-mdph-request-btn">Nouvelle demande MDPH</button></p>
24
  {% for request in object.mdph_requests.all %}
25
  <div class="subframe">
26
    Demande le <strong>{{ request.start_date }}</strong> à la MDPH <strong>{{ request.mdph }}</strong>
27
    <div class="buttons">
28
      <button type="button" data-id="{{ request.id }}" class="del-mdph-request icon-minus" title="Supprimer"></button>
29
      <button type="button" data-id="{{ request.id }}" class="update-mdph-request-btn icon-edit" title="Modifier"></button>
30
    </div>
31
    <div>
32
      <ul>
33
        {% if request.comment %}<li><label>Commentaire</label> : {{ request.comment }}</li>{% endif %}
34
      </ul>
22
  <div class="frame">
23
    <h3>Demandes MDPH</h3>
24
    <p><button id="new-mdph-request-btn">Nouvelle demande MDPH</button></p>
25
    {% for request in object.mdph_requests.all %}
26
    <div class="subframe">
27
      Demande le <strong>{{ request.start_date }}</strong> à la MDPH <strong>{{ request.mdph }}</strong>
28
      <div class="buttons">
29
        <button type="button" data-id="{{ request.id }}" class="del-mdph-request icon-minus" title="Supprimer"></button>
30
        <button type="button" data-id="{{ request.id }}" class="update-mdph-request-btn icon-edit" title="Modifier"></button>
31
      </div>
32
      <div>
33
        <ul>
34
          {% if request.comment %}<li><label>Commentaire</label> : {{ request.comment }}</li>{% endif %}
35
        </ul>
36
      </div>
35 37
    </div>
38
    {% endfor %}
36 39
  </div>
37
  {% endfor %}
38
</div>
39 40

  
40
<div class="frame">
41
  <h3>Réponses MDPH</h3>
42
  <p><button id="new-mdph-response-btn">Nouvelle réponse MDPH</button></p>
43
  {% for response in object.mdph_responses.all %}
44
  <div class="subframe">
45
    Du <strong>{{ response.start_date }}</strong> au <strong>{{ response.end_date }}</strong> à la MDPH <strong>{{ response.mdph }}</strong>
46
    <div class="buttons">
47
      <button type="button" data-id="{{ response.id }}" class="del-mdph-response icon-minus" title="Supprimer"></button>
48
      <button type="button" data-id="{{ response.id }}" class="update-mdph-response-btn icon-edit" title="Modifier"></button>
49
    </div>
50
    <div>
51
      <ul>
52
        {% if response.comment %}<li><label>Commentaire</label> : {{ response.comment }}</li>{% endif %}
53
        {% if response.type_aide %}<li><label>Type d'aide</label> : {{ response.type_aide }}</li>{% endif %}
54
        {% if response.name %}<li><label>Nom</label> : {{ response.name }}</li>{% endif %}
55
        {% if response.rate %}<li><label>Taux</label> : {{ response.rate }}</li>{% endif %}
56
      </ul>
41
  <div class="frame">
42
    <h3>Réponses MDPH</h3>
43
    <p><button id="new-mdph-response-btn">Nouvelle réponse MDPH</button></p>
44
    {% for response in object.mdph_responses.all %}
45
    <div class="subframe">
46
      Du <strong>{{ response.start_date }}</strong> au <strong>{{ response.end_date }}</strong> à la MDPH <strong>{{ response.mdph }}</strong>
47
      <div class="buttons">
48
        <button type="button" data-id="{{ response.id }}" class="del-mdph-response icon-minus" title="Supprimer"></button>
49
        <button type="button" data-id="{{ response.id }}" class="update-mdph-response-btn icon-edit" title="Modifier"></button>
50
      </div>
51
      <div>
52
        <ul>
53
          {% if response.comment %}<li><label>Commentaire</label> : {{ response.comment }}</li>{% endif %}
54
          {% if response.type_aide %}<li><label>Type d'aide</label> : {{ response.type_aide }}</li>{% endif %}
55
          {% if response.name %}<li><label>Nom</label> : {{ response.name }}</li>{% endif %}
56
          {% if response.rate %}<li><label>Taux</label> : {{ response.rate }}</li>{% endif %}
57
        </ul>
58
      </div>
57 59
    </div>
60
    {% endfor %}
58 61
  </div>
59
  {% endfor %}
60 62
</div>
calebasse/dossiers/templates/dossiers/patientrecord_tab8_medical.html
1
<form method="post" id="physiology-form" class="patientrecordform">
2
  {% csrf_token %}
3
  <button class="save enable-on-change">Enregistrer</button>
4
  {% for field in forms.physiology %}
5
  <p>
6
  {{ field.errors }}
7
  </p>
8
  <p>
9
  {{ field.label_tag  }}
10
  {{ field }}
11
  </p>
12
  {% endfor %}
13
  </p>
14
  <input type="hidden"  name="tab"  value="7">
15
  <button class="save enable-on-change">Enregistrer</button>
16
</form>
1
<div id="tabs-8">
2
  <form method="post" action="tab8" id="physiology-form" class="patientrecordform">
3
    {% csrf_token %}
4
    <button class="save enable-on-change">Enregistrer</button>
5
    {% for field in forms.physiology %}
6
    <p>
7
    {{ field.errors }}
8
    </p>
9
    <p>
10
    {{ field.label_tag  }}
11
    {{ field }}
12
    </p>
13
    {% endfor %}
14
    </p>
15
    <input type="hidden"  name="tab"  value="7">
16
    <button class="save enable-on-change">Enregistrer</button>
17
  </form>
18
</div>
calebasse/dossiers/templates/dossiers/patientrecord_update.html
23 23
{% block content %}
24 24
<div id="tabs">
25 25
  <ul>
26
    <li><a data-id="0" class="atabs" href="#tabs-1">Général</a></li>
27
    <li><a data-id="1" class="atabs" href="#tabs-2">Fiche administrative</a></li>
28
    <li><a data-id="2" class="atabs" href="#tabs-3">Adresses / contacts</a></li>
29
    {% if object.service.name == "CMPP" %}
30
    <li><a data-id="3"  class="atabs" href="#tabs-4">Prise en charge</a></li>
31
    {% elif object.service.name == "SESSAD TED" or object.service.name == "SESSAD DYS" %}
32
    <li><a data-id="3" class="atabs" href="#tabs-4">Notifications</a></li>
26
    <li id="tab1">
27
    <a data-id="0" href="tab1" class="atabs">Général</a>
28
    </li>
29
    <li id="tab2">
30
      <a data-id="1" href="tab2" class="atabs">Fiche administrative</a>
31
    </li>
32
    <li id="tab3">
33
      <a data-id="2" href="tab3" class="atabs">Adresses / contacts</a>
34
    </li>
35
    {% if object.service.slug == "cmpp" %}
36
    <li><a data-id="3" href="tab4" class="atabs">Prise en charge</a></li>
37
    {% elif object.service.slug == "sessad-ted" or object.service.name == "sessad-dys" %}
38
    <li><a data-id="3" href="tab4" class="atabs">Notifications</a></li>
33 39
    {% else %}
34
    <li style="display: none;"><a data-id="3" class="atabs" href="#tabs-4">Notifications</a></li>
40
    <li style="display: none;"><a data-id="3" href="tab4" class="atabs">Notifications</a></li>
35 41
    {% endif %}
36
    <li><a data-id="4" class="atabs" href="#tabs-5">Actes passés</a>
37
    <li><a data-id="5" class="atabs" href="#tabs-6">Prochains rendez-vous</a>
38
    <li><a data-id="6" class="atabs" href="#tabs-7">Socialisation</a>
39
    <li><a data-id="7" class="atabs" href="#tabs-8">Données à caractère médical</a>
42
    <li><a data-id="4" class="atabs" href="tab5">Actes passés</a>
43
    <li><a data-id="5" class="atabs" href="tab6">Prochains rendez-vous</a>
44
    <li><a data-id="6" class="atabs" href="tab7">Socialisation</a>
45
    <li><a data-id="7" class="atabs" href="tab8">Données à caractère médical</a>
40 46
  </ul>
41
  <div id="tabs-1"> <!-- Général -->
42
      {% include "dossiers/patientrecord_tab1_general.html" %}
43
  </div>
44

  
45
  <div id="tabs-2"> <!-- Fiche administrative -->
46
      {% include "dossiers/patientrecord_tab2_fiche_adm.html" %}
47
  </div>
48

  
49
    <div id="tabs-3"> <!-- Adresses / Contacts -->
50
      {% include "dossiers/patientrecord_tab3_adresses.html" %}
51
    </div>
52

  
53
    <div id="tabs-4"> <!-- Prise en charge et notifications -->
54
      {% include "dossiers/patientrecord_tab4_notifs.html" %}
55
    </div>
56

  
57
    <div id="tabs-5"> <!-- Actes passés -->
58
      {% include "dossiers/patientrecord_tab5_actes_passes.html" %}
59
    </div>
60

  
61
    <div id="tabs-6"> <!-- Prochains rendez-vous -->
62
      {% include "dossiers/patientrecord_tab6_next_rdv.html" %}
63
    </div>
64

  
65

  
66
    <div id="tabs-7"><!-- Période de socialisation -->
67
      {% include "dossiers/patientrecord_tab7_socialisation.html" %}
68
    </div>
69

  
70
    <div id="tabs-8"><!-- Données à caractère médicale -->
71
      {% include "dossiers/patientrecord_tab8_medical.html" %}
72
    </div>
73
  </div>
74 47
</div>
75 48
{% endblock %}
76 49

  
calebasse/dossiers/urls.py
3 3
from calebasse.cbv import ListView, CreateView, DeleteView, UpdateView
4 4

  
5 5
from models import PatientRecord
6
from views import (patientrecord_home, patient_record, state_form,
7
        new_patient_record, patientrecord_delete, new_patient_contact,
8
        new_patient_address, delete_patient_contact, delete_patient_address,
9
        update_paper_id, update_patient_address, update_patient_contact,
10
        new_healthcare_treatment,
11
        update_healthcare_treatment,
12
        delete_healthcare_treatment,
13
        new_healthcare_diagnostic,
14
        update_healthcare_diagnostic,
15
        delete_healthcare_diagnostic,
16
        new_healthcare_notification,
17
        update_healthcare_notification,
18
        delete_healthcare_notification,
19
        new_socialisation_duration,
20
        update_socialisation_duration,
21
        delete_socialisation_duration,
22
        update_patient_state,
23
        delete_patient_state,
24
        new_mdph_request,
25
        update_mdph_request,
26
        delete_mdph_request,
27
        new_mdph_response,
28
        update_mdph_response,
29
        delete_mdph_response,
30
        generate_rtf_form,
31
        patientrecord_quotations,
32
        patientrecord_waiting_queue,
33
        create_directory,
34
        prescription_transport,
35
        new_protection,
36
        update_protection,
37
        delete_protection)
38 6
from forms import EditPatientRecordForm
39 7

  
40
urlpatterns = patterns('',
41
        url(r'^$', patientrecord_home),
42
        url(r'^quotations$', patientrecord_quotations),
43
        url(r'^waiting-queue$', patientrecord_waiting_queue),
44
        url(r'^new$', new_patient_record),
45
        url(r'^(?P<pk>\d+)/view$', patient_record),
46
        url(r'^(?P<pk>\d+)/delete$', patientrecord_delete),
47
        url(r'^(?P<pk>\d+)/update/paper_id$', update_paper_id),
48
        url(r'^(?P<patientrecord_id>\d+)/update-state$', state_form),
49
        url(r'^(?P<patientrecord_id>\d+)/address/new$', new_patient_address),
50
        url(r'^(?P<patientrecord_id>\d+)/address/(?P<pk>\d+)/update$', update_patient_address),
51
        url(r'^(?P<patientrecord_id>\d+)/address/(?P<pk>\d+)/del$', delete_patient_address),
52
        url(r'^(?P<patientrecord_id>\d+)/contact/new$', new_patient_contact),
53
        url(r'^(?P<patientrecord_id>\d+)/contact/(?P<pk>\d+)/update$', update_patient_contact),
54
        url(r'^(?P<patientrecord_id>\d+)/contact/(?P<pk>\d+)/del$', delete_patient_contact),
55
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/new$', new_healthcare_treatment),
56
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/(?P<pk>\d+)/update$', update_healthcare_treatment),
57
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/(?P<pk>\d+)/del$', delete_healthcare_treatment),
58
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/new$', new_healthcare_diagnostic),
59
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/(?P<pk>\d+)/update$', update_healthcare_diagnostic),
60
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/(?P<pk>\d+)/del$', delete_healthcare_diagnostic),
61
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/new$', new_healthcare_notification),
62
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/(?P<pk>\d+)/update$', update_healthcare_notification),
63
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/(?P<pk>\d+)/del$', delete_healthcare_notification),
64
        url(r'^(?P<patientrecord_id>\d+)/socialisation/new$', new_socialisation_duration),
65
        url(r'^(?P<patientrecord_id>\d+)/socialisation/(?P<pk>\d+)/update$', update_socialisation_duration),
66
        url(r'^(?P<patientrecord_id>\d+)/socialisation/(?P<pk>\d+)/del$', delete_socialisation_duration),
67
        url(r'^(?P<patientrecord_id>\d+)/state/(?P<pk>\d+)/update$', update_patient_state),
68
        url(r'^(?P<patientrecord_id>\d+)/state/(?P<pk>\d+)/del$', delete_patient_state),
69
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/new$', new_mdph_request),
70
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/(?P<pk>\d+)/update$', update_mdph_request),
71
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/(?P<pk>\d+)/del$', delete_mdph_request),
72
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/new$', new_mdph_response),
73
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/(?P<pk>\d+)/update$', update_mdph_response),
74
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/(?P<pk>\d+)/del$', delete_mdph_response),
75
        url(r'^(?P<patientrecord_id>\d+)/generate$', generate_rtf_form),
76
        url(r'^(?P<patientrecord_id>\d+)/create-directory$', create_directory),
77
        url(r'^(?P<patientrecord_id>\d+)/prescription-transport$', prescription_transport),
78
        url(r'^(?P<patientrecord_id>\d+)/protection/new$', new_protection),
79
        url(r'^(?P<patientrecord_id>\d+)/protection/(?P<pk>\d+)/update$', update_protection),
80
        url(r'^(?P<patientrecord_id>\d+)/protection/(?P<pk>\d+)/del$', delete_protection),)
8
urlpatterns = patterns('calebasse.dossiers.views',
9
        url(r'^$', 'patientrecord_home'),
10
        url(r'^quotations$', 'patientrecord_quotations'),
11
        url(r'^waiting-queue$', 'patientrecord_waiting_queue'),
12
        url(r'^new$', 'new_patient_record'),
13
        url(r'^(?P<pk>\d+)/view$', 'patient_record'),
14
        url(r'^(?P<pk>\d+)/tab1$', 'tab1_general'),
15
        url(r'^(?P<pk>\d+)/tab2$', 'tab2_fiche_adm'),
16
        url(r'^(?P<pk>\d+)/tab3$', 'tab3_addresses'),
17
        url(r'^(?P<pk>\d+)/tab4$', 'tab4_notifs'),
18
        url(r'^(?P<pk>\d+)/tab5$', 'tab5_old_acts'),
19
        url(r'^(?P<pk>\d+)/tab6$', 'tab6_next_rdv'),
20
        url(r'^(?P<pk>\d+)/tab7$', 'tab7_socialisation'),
21
        url(r'^(?P<pk>\d+)/tab8$', 'tab8_medical'),
22
        url(r'^(?P<pk>\d+)/delete$', 'patientrecord_delete'),
23
        url(r'^(?P<pk>\d+)/update/paper_id$', 'update_paper_id'),
24
        url(r'^(?P<patientrecord_id>\d+)/update-state$', 'state_form'),
25
        url(r'^(?P<patientrecord_id>\d+)/address/new$', 'new_patient_address'),
26
        url(r'^(?P<patientrecord_id>\d+)/address/(?P<pk>\d+)/update$', 'update_patient_address'),
27
        url(r'^(?P<patientrecord_id>\d+)/address/(?P<pk>\d+)/del$', 'delete_patient_address'),
28
        url(r'^(?P<patientrecord_id>\d+)/contact/new$', 'new_patient_contact'),
29
        url(r'^(?P<patientrecord_id>\d+)/contact/(?P<pk>\d+)/update$', 'update_patient_contact'),
30
        url(r'^(?P<patientrecord_id>\d+)/contact/(?P<pk>\d+)/del$', 'delete_patient_contact'),
31
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/new$', 'new_healthcare_treatment'),
32
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/(?P<pk>\d+)/update$', 'update_healthcare_treatment'),
33
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/(?P<pk>\d+)/del$', 'delete_healthcare_treatment'),
34
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/new$', 'new_healthcare_diagnostic'),
35
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/(?P<pk>\d+)/update$', 'update_healthcare_diagnostic'),
36
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/(?P<pk>\d+)/del$', 'delete_healthcare_diagnostic'),
37
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/new$', 'new_healthcare_notification'),
38
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/(?P<pk>\d+)/update$', 'update_healthcare_notification'),
39
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/(?P<pk>\d+)/del$', 'delete_healthcare_notification'),
40
        url(r'^(?P<patientrecord_id>\d+)/socialisation/new$', 'new_socialisation_duration'),
41
        url(r'^(?P<patientrecord_id>\d+)/socialisation/(?P<pk>\d+)/update$', 'update_socialisation_duration'),
42
        url(r'^(?P<patientrecord_id>\d+)/socialisation/(?P<pk>\d+)/del$', 'delete_socialisation_duration'),
43
        url(r'^(?P<patientrecord_id>\d+)/state/(?P<pk>\d+)/update$', 'update_patient_state'),
44
        url(r'^(?P<patientrecord_id>\d+)/state/(?P<pk>\d+)/del$', 'delete_patient_state'),
45
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/new$', 'new_mdph_request'),
46
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/(?P<pk>\d+)/update$', 'update_mdph_request'),
47
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/(?P<pk>\d+)/del$', 'delete_mdph_request'),
48
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/new$', 'new_mdph_response'),
49
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/(?P<pk>\d+)/update$', 'update_mdph_response'),
50
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/(?P<pk>\d+)/del$', 'delete_mdph_response'),
51
        url(r'^(?P<patientrecord_id>\d+)/generate$', 'generate_rtf_form'),
52
        url(r'^(?P<patientrecord_id>\d+)/create-directory$', 'create_directory'),
53
        url(r'^(?P<patientrecord_id>\d+)/prescription-transport$', 'prescription_transport'),
54
        url(r'^(?P<patientrecord_id>\d+)/protection/new$', 'new_protection'),
55
        url(r'^(?P<patientrecord_id>\d+)/protection/(?P<pk>\d+)/update$', 'update_protection'),
56
        url(r'^(?P<patientrecord_id>\d+)/protection/(?P<pk>\d+)/del$', 'delete_protection'),)
calebasse/dossiers/views.py
19 19
from calebasse import cbv
20 20
from calebasse.doc_templates import make_doc_from_template
21 21
from calebasse.dossiers import forms
22
from calebasse.dossiers.views_utils import get_next_rdv, get_last_rdv, get_status
22 23
from calebasse.dossiers.transport import render_transport
23 24
from calebasse.agenda.models import Event, EventWithAct
24 25
from calebasse.actes.models import Act
......
34 35

  
35 36
from calebasse.decorators import validator_only
36 37

  
37
def get_next_rdv(patient_record):
38
    Q = models.Q
39
    today = date.today()
40
    qs = EventWithAct.objects.filter(patient=patient_record) \
41
            .filter(exception_to__isnull=True, canceled=False) \
42
            .filter(Q(start_datetime__gte=today) \
43
            |  Q(exceptions__isnull=False) \
44
            | ( Q(recurrence_periodicity__isnull=False) \
45
            & (Q(recurrence_end_date__gte=today) \
46
            | Q(recurrence_end_date__isnull=True) \
47
            ))) \
48
            .distinct() \
49
            .select_related() \
50
            .prefetch_related('participants', 'exceptions__eventwithact')
51
    occurrences = []
52
    for event in qs:
53
        occurrences.extend(filter(lambda e: e.start_datetime.date() >= today, event.all_occurences(limit=180)))
54
    occurrences = sorted(occurrences, key=lambda e: e.start_datetime)
55
    if occurrences:
56
        return occurrences[0]
57
    else:
58
        return None
59

  
60
def get_last_rdv(patient_record):
61
    last_rdv = {}
62
    event = Event.objects.last_appointment(patient_record)
63
    if event:
64
        last_rdv['start_datetime'] = event.start_datetime
65
        last_rdv['participants'] = event.participants.all()
66
        last_rdv['act_type'] = event.eventwithact.act_type
67
        last_rdv['act_state'] = event.act.get_state()
68
        last_rdv['is_absent'] = event.is_absent()
69
    return last_rdv
70 38

  
71 39
class NewPatientRecordView(cbv.FormView, cbv.ServiceViewMixin):
72 40
    form_class = forms.NewPatientRecordForm
......
157 125
    success_url = '../../view#tab=2'
158 126

  
159 127
    def form_valid(self, form):
160
        messages.add_message(self.request, messages.INFO, u'Modification enregistrée avec succès.')
128
        messages.add_message(self.request,
129
                messages.INFO,
130
                u'Modification enregistrée avec succès.')
161 131
        return super(UpdatePatientAddressView, self).form_valid(form)
162 132

  
163 133
update_patient_address = UpdatePatientAddressView.as_view()
......
243 213

  
244 214
state_form = StateFormView.as_view()
245 215

  
246

  
247
class PatientRecordView(cbv.ServiceViewMixin, cbv.MultiUpdateView):
216
class PatientRecordView(cbv.UpdateView):
248 217
    model = PatientRecord
249
    forms_classes = {
250
            'general': forms.GeneralForm,
251
            'contact': forms.PatientContactForm,
252
            'id': forms.CivilStatusForm,
253
            'physiology': forms.PhysiologyForm,
254
            'inscription': forms.InscriptionForm,
255
            'out': forms.OutForm,
256
            'family': forms.FamilyForm,
257
            'transport': forms.TransportFrom,
258
            'followup': forms.FollowUpForm,
259
            'policyholder': forms.PolicyHolderForm
260
            }
261 218
    template_name = 'dossiers/patientrecord_update.html'
262
    success_url = './view'
263

  
264
    def get_success_url(self):
265
        if self.request.POST.has_key('tab'):
266
            return self.success_url + '#tab=' + self.request.POST['tab']
267
        else:
268
            return self.success_url
269 219

  
270 220
    def get_context_data(self, **kwargs):
271 221
        ctx = super(PatientRecordView, self).get_context_data(**kwargs)
272 222
        ctx['object'].create_diag_healthcare(self.request.user)
273 223
        ctx['object'].automated_switch_state(self.request.user)
274
        ctx['initial_state'] = ctx['object'].get_initial_state()
275 224
        current_state = ctx['object'].get_current_state()
225
        if not current_state:
226
            current_state = ctx['object'].get_state()
227
            ctx['future_state'] = True
276 228
        if STATES_MAPPING.has_key(current_state.status.type):
277 229
            state = STATES_MAPPING[current_state.status.type]
278 230
        else:
......
282 234
        ctx['states'] = FileState.objects.filter(patient=self.object) \
283 235
                .filter(status__services=self.service) \
284 236
                .order_by('-date_selected')
285
        ctx['next_rdvs'] = []
286
        Q = models.Q
287
        today = date.today()
288
        qs = EventWithAct.objects.filter(patient=ctx['object']) \
289
                .filter(exception_to__isnull=True, canceled=False) \
290
                .filter(Q(start_datetime__gte=today) \
291
                |  Q(exceptions__isnull=False) \
292
                | ( Q(recurrence_periodicity__isnull=False) \
293
                & (Q(recurrence_end_date__gte=today) \
294
                | Q(recurrence_end_date__isnull=True) \
295
                ))) \
296
                .distinct() \
297
                .select_related() \
298
                .prefetch_related('participants', 'exceptions__eventwithact',
299
                        'act_set__actvalidationstate_set')
300
        occurrences = []
301
        for event in qs:
302
            occurrences.extend(filter(lambda e: e.start_datetime.date() >= today,
303
                event.all_occurences(limit=180)))
304
        occurrences = sorted(occurrences, key=lambda e: e.start_datetime)
305
        for event in occurrences:
306
            state = None
307
            if event.act:
308
                state = event.act.get_state()
309
            if state and not state.previous_state and state.state_name == 'NON_VALIDE':
310
                state = None
311
            ctx['next_rdvs'].append((event, state, event.get_missing_participants()))
312
        if ctx['next_rdvs']:
313
            ctx['next_rdv'] = ctx['next_rdvs'][0][0]
314
        ctx['last_rdvs'] = []
315
        for act in Act.objects.last_acts(ctx['object']).prefetch_related('doctors'):
316
            state = act.get_state()
317
            if state and not state.previous_state and state.state_name == 'NON_VALIDE':
318
                state = None
319
            missing_workers = []
320
            try:
321
                missing_workers = [participant.worker for participant in act.event.get_missing_participants()]
322
            except:
323
                pass
324
            ctx['last_rdvs'].append((act, state, missing_workers))
325
        history = []
326
        i = 0
327
        for state in ctx['object'].filestate_set.order_by('-date_selected'):
328
            acts = []
329
            try:
330
                while ctx['last_rdvs'][i][0].date >= state.date_selected.date():
331
                    acts.append(ctx['last_rdvs'][i])
332
                    i += 1
333
            except:
334
                pass
335
            history.append((state, acts))
336
        if i < len(ctx['last_rdvs']) -1:
337
            history.append((None, ctx['last_rdvs'][i:]))
338
        ctx['history'] = history
339
        ctx['last_rdv'] = get_last_rdv(ctx['object'])
237
        return ctx
340 238

  
239
patient_record = PatientRecordView.as_view()
240

  
241
class PatientRecordGeneralView(cbv.UpdateView):
242
    model = PatientRecord
243
    form_class = forms.GeneralForm
244
    template_name = 'dossiers/patientrecord_tab1_general.html'
245
    success_url = './view'
246

  
247
    def get_context_data(self, **kwargs):
248
        ctx = super(PatientRecordGeneralView, self).get_context_data(**kwargs)
249
        ctx['nb_place_of_lifes'] = ctx['object'].addresses.filter(place_of_life=True).count()
250
        ctx['initial_state'] = ctx['object'].get_initial_state()
251
        ctx['last_rdv'] = get_last_rdv(ctx['object'])
252
        ctx['next_rdv'] = get_next_rdv(ctx['object'])
253
        current_state = ctx['object'].get_current_state()
254
        if STATES_MAPPING.has_key(current_state.status.type):
255
            state = STATES_MAPPING[current_state.status.type]
256
        else:
257
            state = current_state.status.name
258
        ctx['current_state'] = current_state
259
        ctx['status'], ctx['hc_status'] = get_status(ctx, self.request.user)
341 260
        ctx['missing_policy'] = False
342 261
        if not self.object.policyholder or \
343 262
                not self.object.policyholder.health_center or \
......
346 265
        ctx['missing_birthdate'] = False
347 266
        if not self.object.birthdate:
348 267
            ctx['missing_birthdate'] = True
268
        return ctx
349 269

  
350
        ctx['status'] = []
351
        close_btn = STATES_BTN_MAPPER['CLOS']
352
        if 'next_rdv' in ctx:
353
            close_btn = STATES_BTN_MAPPER['CLOS_RDV']
354
        if ctx['object'].service.name == "CMPP":
355
            ctx['can_rediag'] = self.object.create_diag_healthcare(self.request.user)
356
            status = self.object.get_healthcare_status()
357
            highlight = False
358
            if status[0] == -1:
359
                status = 'Indéterminé.'
360
                highlight = True
361
            elif status[0] == 0:
362
                status = "Prise en charge de diagnostic en cours."
363
            elif status[0] == 1:
364
                status = 'Patient jamais pris en charge.'
365
            elif status[0] == 2:
366
                status = "Prise en charge de diagnostic complète, faire une demande de prise en charge de traitement."
367
                highlight = True
368
            elif status[0] == 3:
369
                if ctx['can_rediag']:
370
                    status = "Prise en charge de traitement expirée. Patient élligible en rediagnostic."
371
                    highlight = True
372
                else:
373
                    status = "Prise en charge de traitement expirée. La demande d'un renouvellement est possible."
374
                    highlight = True
375
            elif status[0] == 4:
376
                status = "Il existe une prise en charge de traitement mais qui ne prendra effet que le %s." % str(status[1])
377
            elif status[0] == 5:
378
                status = "Prise en charge de traitement en cours."
379
            elif status[0] == 6:
380
                status = "Prise en charge de traitement complète mais qui peut être prolongée."
381
                highlight = True
382
            elif status[0] == 7:
383
                status = "Prise en charge de traitement complète et déjà prolongée, se terminant le %s." % \
384
                    formats.date_format(status[2], "SHORT_DATE_FORMAT")
385
            else:
386
                status = 'Statut inconnu.'
387
            ctx['hc_status'] = (status, highlight)
388
            if ctx['object'].last_state.status.type == "ACCUEIL":
389
                # Inscription automatique au premier acte facturable valide
390
                ctx['status'] = [STATES_BTN_MAPPER['FIN_ACCUEIL'],
391
                        STATES_BTN_MAPPER['DIAGNOSTIC'],
392
                        STATES_BTN_MAPPER['TRAITEMENT']]
393
            elif ctx['object'].last_state.status.type == "FIN_ACCUEIL":
394
                # Passage automatique en diagnostic ou traitement
395
                ctx['status'] = [STATES_BTN_MAPPER['ACCUEIL'],
396
                        STATES_BTN_MAPPER['DIAGNOSTIC'],
397
                        STATES_BTN_MAPPER['TRAITEMENT']]
398
            elif ctx['object'].last_state.status.type == "DIAGNOSTIC":
399
                # Passage automatique en traitement
400
                ctx['status'] = [STATES_BTN_MAPPER['TRAITEMENT'],
401
                        close_btn,
402
                        STATES_BTN_MAPPER['ACCUEIL']]
403
            elif ctx['object'].last_state.status.type == "TRAITEMENT":
404
                # Passage automatique en diagnostic si on ajoute une prise en charge diagnostic,
405
                # ce qui est faisable dans l'onglet prise en charge par un bouton visible sous conditions
406
                ctx['status'] = [STATES_BTN_MAPPER['DIAGNOSTIC'],
407
                        close_btn,
408
                        STATES_BTN_MAPPER['ACCUEIL']]
409
            elif ctx['object'].last_state.status.type == "CLOS":
410
                # Passage automatique en diagnostic ou traitement
411
                ctx['status'] = [STATES_BTN_MAPPER['DIAGNOSTIC'],
412
                        STATES_BTN_MAPPER['TRAITEMENT'],
413
                        STATES_BTN_MAPPER['ACCUEIL']]
270
tab1_general = PatientRecordGeneralView.as_view()
271

  
272
class PatientRecordAdmView(cbv.ServiceViewMixin, cbv.MultiUpdateView):
273
    model = PatientRecord
274
    forms_classes = {
275
            'id': forms.CivilStatusForm,
276
            'inscription': forms.InscriptionForm,
277
            'out': forms.OutForm,
278
            'family': forms.FamilyForm,
279
            'transport': forms.TransportFrom,
280
            'followup': forms.FollowUpForm,
281
            }
282
    template_name = 'dossiers/patientrecord_tab2_fiche_adm.html'
283
    success_url = './view#tab=1'
284

  
285

  
286
    def get_context_data(self, **kwargs):
287
        ctx = super(PatientRecordAdmView, self).get_context_data(**kwargs)
288
        try:
289
            ctx['last_prescription'] = TransportPrescriptionLog.objects.filter(patient=ctx['object']).latest('created')
290
        except:
291
            pass
292
        return ctx
293

  
294
tab2_fiche_adm = PatientRecordAdmView.as_view()
295

  
296
class PatientRecordAddrView(cbv.ServiceViewMixin, cbv.MultiUpdateView):
297
    model = PatientRecord
298
    forms_classes = {
299
            'contact': forms.PatientContactForm,
300
            'policyholder': forms.PolicyHolderForm
301
            }
302
    template_name = 'dossiers/patientrecord_tab3_adresses.html'
303
    success_url = './view#tab=2'
304

  
305

  
306
    def get_context_data(self, **kwargs):
307
        ctx = super(PatientRecordAddrView, self).get_context_data(**kwargs)
308
        ctx['nb_place_of_lifes'] = ctx['object'].addresses.filter(place_of_life=True).count()
309
        ctx['addresses'] = ctx['object'].addresses.order_by('-place_of_life', 'id')
310
        return ctx
311

  
312
tab3_addresses = PatientRecordAddrView.as_view()
313

  
314
class PatientRecordNotifsView(cbv.DetailView):
315
    model = PatientRecord
316
    template_name = 'dossiers/patientrecord_tab4_notifs.html'
317

  
318
    def get_context_data(self, **kwargs):
319
        ctx = super(PatientRecordNotifsView, self).get_context_data(**kwargs)
320
        ctx['status'], ctx['hc_status'] = get_status(ctx, self.request.user)
321
        if ctx['object'].service.slug == "cmpp":
414 322
            (acts_not_locked, days_not_locked, acts_not_valide,
415 323
            acts_not_billable, acts_pause, acts_per_hc, acts_losts) = \
416 324
                list_acts_for_billing_CMPP_per_patient(self.object,
......
433 341
            ctx['hcs'] = []
434 342
            for hc, acts in hcs:
435 343
                ctx['hcs'].append((hc, acts, hc.act_set.order_by('date', 'time')))
436
        elif ctx['object'].service.name == "CAMSP":
437
            if ctx['object'].last_state.status.type == "ACCUEIL":
438
                ctx['status'] = [STATES_BTN_MAPPER['FIN_ACCUEIL'],
439
                        STATES_BTN_MAPPER['BILAN']]
440
            elif ctx['object'].last_state.status.type == "FIN_ACCUEIL":
441
                ctx['status'] = [STATES_BTN_MAPPER['ACCUEIL'],
442
                        STATES_BTN_MAPPER['BILAN'],
443
                        STATES_BTN_MAPPER['SURVEILLANCE'],
444
                        STATES_BTN_MAPPER['SUIVI'],
445
                        close_btn]
446
            elif ctx['object'].last_state.status.type == "BILAN":
447
                ctx['status'] = [STATES_BTN_MAPPER['SURVEILLANCE'],
448
                        STATES_BTN_MAPPER['SUIVI'],
449
                        close_btn,
450
                        STATES_BTN_MAPPER['ACCUEIL']]
451
            elif ctx['object'].last_state.status.type == "SURVEILLANCE":
452
                ctx['status'] = [STATES_BTN_MAPPER['SUIVI'],
453
                        close_btn,
454
                        STATES_BTN_MAPPER['ACCUEIL'],
455
                        STATES_BTN_MAPPER['BILAN']]
456
            elif ctx['object'].last_state.status.type == "SUIVI":
457
                ctx['status'] = [close_btn,
458
                        STATES_BTN_MAPPER['ACCUEIL'],
459
                        STATES_BTN_MAPPER['BILAN'],
460
                        STATES_BTN_MAPPER['SURVEILLANCE']]
461
            elif ctx['object'].last_state.status.type == "CLOS":
462
                ctx['status'] = [STATES_BTN_MAPPER['ACCUEIL'],
463
                        STATES_BTN_MAPPER['BILAN'],
464
                        STATES_BTN_MAPPER['SURVEILLANCE'],
465
                        STATES_BTN_MAPPER['SUIVI']]
466
        elif ctx['object'].service.name == "SESSAD TED" or ctx['object'].service.name == "SESSAD DYS":
467
            if ctx['object'].last_state.status.type == "ACCUEIL":
468
                ctx['status'] = [STATES_BTN_MAPPER['FIN_ACCUEIL'],
469
                        STATES_BTN_MAPPER['TRAITEMENT']]
470
            elif ctx['object'].last_state.status.type == "FIN_ACCUEIL":
471
                ctx['status'] = [STATES_BTN_MAPPER['ACCUEIL'],
472
                        STATES_BTN_MAPPER['TRAITEMENT'],
473
                        close_btn]
474
            elif ctx['object'].last_state.status.type == "TRAITEMENT":
475
                ctx['status'] = [close_btn,
476
                        STATES_BTN_MAPPER['ACCUEIL']]
477
            elif ctx['object'].last_state.status.type == "CLOS":
478
                ctx['status'] = [STATES_BTN_MAPPER['ACCUEIL'],
479
                        STATES_BTN_MAPPER['TRAITEMENT']]
344
        elif ctx['object'].service.slug == "sessad-ted" or ctx['object'].service.slug == "sessad-dys":
480 345
            ctx['hcs'] = HealthCare.objects.filter(patient=self.object).order_by('-start_date')
481
        try:
482
            ctx['last_prescription'] = TransportPrescriptionLog.objects.filter(patient=ctx['object']).latest('created')
483
        except:
484
            pass
346
        return ctx
485 347

  
486
        ctx['addresses'] = ctx['object'].addresses.order_by('-place_of_life', 'id')
487
        ctx['nb_place_of_lifes'] = ctx['object'].addresses.filter(place_of_life=True).count()
348
tab4_notifs = PatientRecordNotifsView.as_view()
349

  
350
class PatientRecordOldActs(cbv.DetailView):
351
    model = PatientRecord
352
    template_name = 'dossiers/patientrecord_tab5_actes_passes.html'
353

  
354
    def get_context_data(self, **kwargs):
355
        ctx = super(PatientRecordOldActs, self).get_context_data(**kwargs)
356
        ctx['last_rdvs'] = []
357
        for act in Act.objects.last_acts(ctx['object']).prefetch_related('doctors'):
358
            state = act.get_state()
359
            if state and not state.previous_state and state.state_name == 'NON_VALIDE':
360
                state = None
361
            missing_workers = []
362
            try:
363
                missing_workers = [participant.worker for participant in act.event.get_missing_participants()]
364
            except:
365
                pass
366
            ctx['last_rdvs'].append((act, state, missing_workers))
367
        history = []
368
        i = 0
369
        for state in ctx['object'].filestate_set.order_by('-date_selected'):
370
            acts = []
371
            try:
372
                while ctx['last_rdvs'][i][0].date >= state.date_selected.date():
373
                    acts.append(ctx['last_rdvs'][i])
374
                    i += 1
375
            except:
376
                pass
377
            history.append((state, acts))
378
        if i < len(ctx['last_rdvs']) - 1:
379
            history.append((None, ctx['last_rdvs'][i:]))
380
        ctx['history'] = history
488 381
        return ctx
489 382

  
490
    def form_valid(self, form):
491
        messages.add_message(self.request, messages.INFO, u'Modification enregistrée avec succès.')
492
        return super(PatientRecordView, self).form_valid(form)
383
tab5_old_acts = PatientRecordOldActs.as_view()
493 384

  
385
class PatientRecordNextAppointmentsView(cbv.DetailView):
386
    model = PatientRecord
387
    template_name = 'dossiers/patientrecord_tab6_next_rdv.html'
494 388

  
495
patient_record = PatientRecordView.as_view()
389
    def get_context_data(self, **kwargs):
390
        ctx = super(PatientRecordNextAppointmentsView, self).get_context_data(**kwargs)
391
        ctx['next_rdvs'] = []
392
        Q = models.Q
393
        today = date.today()
394
        qs = EventWithAct.objects.filter(patient=ctx['object']) \
395
                .filter(exception_to__isnull=True, canceled=False) \
396
                .filter(Q(start_datetime__gte=today) \
397
                |  Q(exceptions__isnull=False) \
398
                | ( Q(recurrence_periodicity__isnull=False) \
399
                & (Q(recurrence_end_date__gte=today) \
400
                | Q(recurrence_end_date__isnull=True) \
401
                ))) \
402
                .distinct() \
403
                .select_related() \
404
                .prefetch_related('participants', 'exceptions__eventwithact',
405
                        'act_set__actvalidationstate_set')
406
        occurrences = []
407
        for event in qs:
408
            occurrences.extend(filter(lambda e: e.start_datetime.date() >= today,
409
                event.all_occurences(limit=180)))
410
        occurrences = sorted(occurrences, key=lambda e: e.start_datetime)
411
        for event in occurrences:
412
            state = None
413
            if event.act:
414
                state = event.act.get_state()
415
            if state and not state.previous_state and state.state_name == 'NON_VALIDE':
416
                state = None
417
            ctx['next_rdvs'].append((event, state, event.get_missing_participants()))
418
        return ctx
419

  
420
tab6_next_rdv = PatientRecordNextAppointmentsView.as_view()
421

  
422
class PatientRecordSocialisationView(cbv.DetailView):
423
    model = PatientRecord
424
    template_name = 'dossiers/patientrecord_tab7_socialisation.html'
425

  
426
tab7_socialisation = PatientRecordSocialisationView.as_view()
427

  
428
class PatientRecordMedicalView(cbv.ServiceViewMixin, cbv.MultiUpdateView):
429
    model = PatientRecord
430
    forms_classes = {'physiology': forms.PhysiologyForm}
431
    template_name = 'dossiers/patientrecord_tab8_medical.html'
432
    success_url = './view#tab=7'
433

  
434
tab8_medical = PatientRecordMedicalView.as_view()
496 435

  
497 436
class PatientRecordsHomepageView(cbv.ListView):
498 437
    model = PatientRecord
calebasse/dossiers/views_utils.py
1
# -*- coding: utf-8 -*-
2

  
3
from datetime import date
4

  
5
from django.db import models
6
from django.utils import formats
7

  
8
from calebasse.agenda.models import Event, EventWithAct
9
from calebasse.dossiers.states import STATES_BTN_MAPPER
10

  
11
def get_status(ctx, user):
12
    """
13
    Return status and hc_status
14
    """
15
    status = []
16
    close_btn = STATES_BTN_MAPPER['CLOS']
17
    if 'next_rdv' in ctx:
18
        close_btn = STATES_BTN_MAPPER['CLOS_RDV']
19
    if ctx['object'].service.slug == "cmpp":
20
        ctx['can_rediag'] = ctx['object'].create_diag_healthcare(user)
21
        status = ctx['object'].get_healthcare_status()
22
        highlight = False
23
        if status[0] == -1:
24
            status = 'Indéterminé.'
25
            highlight = True
26
        elif status[0] == 0:
27
            status = "Prise en charge de diagnostic en cours."
28
        elif status[0] == 1:
29
            status = 'Patient jamais pris en charge.'
30
        elif status[0] == 2:
31
            status = "Prise en charge de diagnostic complète, faire une demande de prise en charge de traitement."
32
            highlight = True
33
        elif status[0] == 3:
34
            if ctx['can_rediag']:
35
                status = "Prise en charge de traitement expirée. Patient élligible en rediagnostic."
36
                highlight = True
37
            else:
38
                status = "Prise en charge de traitement expirée. La demande d'un renouvellement est possible."
39
                highlight = True
40
        elif status[0] == 4:
41
            status = "Il existe une prise en charge de traitement mais qui ne prendra effet que le %s." % str(status[1])
42
        elif status[0] == 5:
43
            status = "Prise en charge de traitement en cours."
44
        elif status[0] == 6:
45
            status = "Prise en charge de traitement complète mais qui peut être prolongée."
46
            highlight = True
47
        elif status[0] == 7:
48
            status = "Prise en charge de traitement complète et déjà prolongée, se terminant le %s." % \
49
                formats.date_format(status[2], "SHORT_DATE_FORMAT")
50
        else:
51
            status = 'Statut inconnu.'
52
        hc_status = (status, highlight)
53
        if ctx['object'].last_state.status.type == "ACCUEIL":
54
            # Inscription automatique au premier acte facturable valide
55
            status = [STATES_BTN_MAPPER['FIN_ACCUEIL'],
56
                    STATES_BTN_MAPPER['DIAGNOSTIC'],
57
                    STATES_BTN_MAPPER['TRAITEMENT']]
58
        elif ctx['object'].last_state.status.type == "FIN_ACCUEIL":
59
            # Passage automatique en diagnostic ou traitement
60
            status = [STATES_BTN_MAPPER['ACCUEIL'],
61
                    STATES_BTN_MAPPER['DIAGNOSTIC'],
62
                    STATES_BTN_MAPPER['TRAITEMENT']]
63
        elif ctx['object'].last_state.status.type == "DIAGNOSTIC":
64
            # Passage automatique en traitement
65
            status = [STATES_BTN_MAPPER['TRAITEMENT'],
66
                    close_btn,
67
                    STATES_BTN_MAPPER['ACCUEIL']]
68
        elif ctx['object'].last_state.status.type == "TRAITEMENT":
69
            # Passage automatique en diagnostic si on ajoute une prise en charge diagnostic,
70
            # ce qui est faisable dans l'onglet prise en charge par un bouton visible sous conditions
71
            status = [STATES_BTN_MAPPER['DIAGNOSTIC'],
72
                    close_btn,
73
                    STATES_BTN_MAPPER['ACCUEIL']]
74
        elif ctx['object'].last_state.status.type == "CLOS":
75
            # Passage automatique en diagnostic ou traitement
76
            status = [STATES_BTN_MAPPER['DIAGNOSTIC'],
77
                    STATES_BTN_MAPPER['TRAITEMENT'],
78
                    STATES_BTN_MAPPER['ACCUEIL']]
79
        elif ctx['object'].service.slug == "camsp":
80
            if ctx['object'].last_state.status.type == "ACCUEIL":
81
                status = [STATES_BTN_MAPPER['FIN_ACCUEIL'],
82
                        STATES_BTN_MAPPER['BILAN']]
83
            elif ctx['object'].last_state.status.type == "FIN_ACCUEIL":
84
                status = [STATES_BTN_MAPPER['ACCUEIL'],
85
                        STATES_BTN_MAPPER['BILAN'],
86
                        STATES_BTN_MAPPER['SURVEILLANCE'],
87
                        STATES_BTN_MAPPER['SUIVI'],
88
                        close_btn]
89
            elif ctx['object'].last_state.status.type == "BILAN":
90
                status = [STATES_BTN_MAPPER['SURVEILLANCE'],
91
                        STATES_BTN_MAPPER['SUIVI'],
92
                        close_btn,
93
                        STATES_BTN_MAPPER['ACCUEIL']]
94
            elif ctx['object'].last_state.status.type == "SURVEILLANCE":
95
                status = [STATES_BTN_MAPPER['SUIVI'],
96
                        close_btn,
97
                        STATES_BTN_MAPPER['ACCUEIL'],
98
                        STATES_BTN_MAPPER['BILAN']]
99
            elif ctx['object'].last_state.status.type == "SUIVI":
100
                status = [close_btn,
101
                        STATES_BTN_MAPPER['ACCUEIL'],
102
                        STATES_BTN_MAPPER['BILAN'],
103
                        STATES_BTN_MAPPER['SURVEILLANCE']]
104
            elif ctx['object'].last_state.status.type == "CLOS":
105
                status = [STATES_BTN_MAPPER['ACCUEIL'],
106
                        STATES_BTN_MAPPER['BILAN'],
107
                        STATES_BTN_MAPPER['SURVEILLANCE'],
108
                        STATES_BTN_MAPPER['SUIVI']]
109
        elif ctx['object'].service.slug == "sessad-ted" or ctx['object'].service.slug == "sessad-dys":
110
            if ctx['object'].last_state.status.type == "ACCUEIL":
111
                status = [STATES_BTN_MAPPER['FIN_ACCUEIL'],
112
                        STATES_BTN_MAPPER['TRAITEMENT']]
113
            elif ctx['object'].last_state.status.type == "FIN_ACCUEIL":
114
                status = [STATES_BTN_MAPPER['ACCUEIL'],
115
                        STATES_BTN_MAPPER['TRAITEMENT'],
116
                        close_btn]
117
            elif ctx['object'].last_state.status.type == "TRAITEMENT":
118
                status = [close_btn,
119
                        STATES_BTN_MAPPER['ACCUEIL']]
120
            elif ctx['object'].last_state.status.type == "CLOS":
121
                status = [STATES_BTN_MAPPER['ACCUEIL'],
122
                        STATES_BTN_MAPPER['TRAITEMENT']]
123
        return (status, hc_status)
124

  
125
def get_last_rdv(patient_record):
126
    last_rdv = {}
127
    event = Event.objects.last_appointment(patient_record)
128
    if event:
129
        last_rdv['start_datetime'] = event.start_datetime
130
        last_rdv['participants'] = event.participants.all()
131
        last_rdv['act_type'] = event.eventwithact.act_type
132
        last_rdv['act_state'] = event.act.get_state()
133
        last_rdv['is_absent'] = event.is_absent()
134
    return last_rdv
135

  
136
def get_next_rdv(patient_record):
137
    Q = models.Q
138
    today = date.today()
139
    qs = EventWithAct.objects.filter(patient=patient_record) \
140
            .filter(exception_to__isnull=True, canceled=False) \
141
            .filter(Q(start_datetime__gte=today) \
142
            |  Q(exceptions__isnull=False) \
143
            | ( Q(recurrence_periodicity__isnull=False) \
144
            & (Q(recurrence_end_date__gte=today) \
145
            | Q(recurrence_end_date__isnull=True) \
146
            ))) \
147
            .distinct() \
148
            .select_related() \
149
            .prefetch_related('participants', 'exceptions__eventwithact')
150
    occurrences = []
151
    for event in qs:
152
        occurrences.extend(filter(lambda e: e.start_datetime.date() >= today, event.all_occurences(limit=180)))
153
    occurrences = sorted(occurrences, key=lambda e: e.start_datetime)
154
    if occurrences:
155
        return occurrences[0]
156
    else:
157
        return None
calebasse/static/css/dossiers.css
1
#tabs-2 select {
2
    width: auto;
3
    height: auto;
4
}
5

  
6
#tabs-2 table {
7
  width: 100%;
8
  text-align: center;
9
}
10

  
11
#tabs-3 div {
12
  margin-top: 1em;
13
  position: relative;
14
}
15

  
16
#tabs-3 div.contact {
17
        margin: 12px;
18
        background: #eee;
19
        padding: 1em;
20
        border-radius: 10px;
21
}
22

  
23
#tabs-3 div.contact.patient {
24
	background: #ddd;
25
	border-width: 2px;
26
}
27

  
28
#tabs-3 div.contact h4 {
29
        margin: 0;
30
}
31

  
32
#contact-add-address {
33
    margin-top: 5px;
34
    margin-left: 10px;
35
}
36

  
37
div#tabs-3 div.right {
38
        text-align: right;
39
        border: 0;
40
        position: absolute;
41
        top: 20px;
42
        right: 0;
43
        width: 350px;
44
        padding-right: 30px;
45
}
46

  
47
div#tabs-3 div.right button {
48
        margin-left: 20px;
49
}
50

  
51
div#tabs-3 div.contact div.right {
52
        padding-right: 18px; /* 30px - 12px */
53
        top: -4px;
54
}
55

  
56
div#tabs-2 div,
57
div#tabs-3 div,
58
div#tabs-4 div.frame,
59
div#tabs-7 div.frame {
60
        position: relative;
61
}
62

  
63
#info-membre div button.save,
64
div.group_holidays button.save,
65
div#tabs-7 div div.buttons,
66
div#tabs-4 div div.buttons,
67
div#tabs-3 div div.buttons,
68
div#tabs-2 div button.save {
69
        position: absolute;
70
        top: 0;
71
        right: 0;
72
}
73

  
74
#tabs-2 div.frame div.subframe,
75
#tabs-7 div.frame div.subframe {
76
	position: relative;
77
        margin: 12px;
78
        background: #eee;
79
        padding: 1em;
80
        border-radius: 10px;
81
}
82

  
83
div#tabs-3 div div.buttons,
84
div#tabs-4 div div.buttons {
85
	border: 0;
86
	margin: 0;
87
}
88

  
89
#tabs-8 form p {
90
	clear: both;
91
}
calebasse/static/css/style.css
706 706
  margin: 0 1ex;
707 707
}
708 708

  
709
#tabs-2 select {
710
        width: auto;
711
        height: auto;
712
}
713

  
714
#tabs-2 table {
715
  width: 100%;
716
  text-align: center;
717
}
718

  
719
#tabs-3 div {
720
  margin-top: 1em;
721
  position: relative;
722
}
723

  
724
#tabs-3 div.contact {
725
        margin: 12px;
726
        background: #eee;
727
        padding: 1em;
728
        border-radius: 10px;
729
}
730

  
731
#tabs-3 div.contact.patient {
732
	background: #ddd;
733
	border-width: 2px;
734
}
735

  
736
#tabs-3 div.contact h4 {
737
        margin: 0;
738
}
739

  
740
#contact-add-address {
741
    margin-top: 5px;
742
    margin-left: 10px;
743
}
744

  
745
div#tabs-3 div.right {
746
        text-align: right;
747
        border: 0;
748
        position: absolute;
749
        top: 20px;
750
        right: 0;
751
        width: 350px;
752
        padding-right: 30px;
753
}
754

  
755
div#tabs-3 div.right button {
756
        margin-left: 20px;
757
}
758

  
759
div#tabs-3 div.contact div.right {
760
        padding-right: 18px; /* 30px - 12px */
761
        top: -4px;
762
}
763

  
764
div#tabs-2 div,
765
div#tabs-3 div,
766
div#tabs-4 div.frame,
767
div#tabs-7 div.frame {
768
        position: relative;
769
}
770

  
771
#info-membre div button.save,
772
div.group_holidays button.save,
773
div#tabs-7 div div.buttons,
774
div#tabs-4 div div.buttons,
775
div#tabs-3 div div.buttons,
776
div#tabs-2 div button.save {
777
        position: absolute;
778
        top: 0;
779
        right: 0;
780
}
781

  
782
#tabs-2 div.frame div.subframe,
783
#tabs-7 div.frame div.subframe {
784
	position: relative;
785
        margin: 12px;
786
        background: #eee;
787
        padding: 1em;
788
        border-radius: 10px;
789
}
790

  
791
div#tabs-3 div div.buttons,
792
div#tabs-4 div div.buttons {
793
	border: 0;
794
	margin: 0;
795
}
796

  
797 709
#info-membre div, div.group_holidays {
798 710
  position: relative;
799 711
}
......
1281 1193
  overflow-y: scroll;
1282 1194
}
1283 1195

  
1284
#tabs-8 form p {
1285
	clear: both;
1286
}
1287 1196

  
1288 1197
ul.messages, ul.ajax_messages {
1289 1198
	position: absolute;

Formats disponibles : Unified diff