Project

General

Profile

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

calebasse / calebasse / actes / templates / actes / act_listing.html @ 63e8433f

1
{% extends "calebasse/base.html" %}
2

    
3
{% load url from future %}
4

    
5
{% block extrascripts %}
6
{{ block.super }}
7
<script src="{{ STATIC_URL }}js/calebasse.datesel.js"></script>
8
<script>
9
  $(function() {
10
    $('.date').datepicker();
11
    $('table#actes tr').click(function() {
12

    
13
      $('#acte-dlg').dialog({title: 'Acte',
14
        width: '500px',
15
        buttons: [ { text: "Annuler",
16
          click: function() { $(this).dialog("close"); } },
17
        { text: "Enregistrer",
18
          click: function() { $(this).dialog("close"); } }
19
        ]}
20
      );
21

    
22
    });
23
    $('#new-acte').click(function() {
24
      $('#new-acte-dlg').dialog({title: 'Nouvel acte',
25
        width: '550px',
26
        buttons: [ { text: "Fermer",
27
          click: function() { $(this).dialog("close"); } },
28
        { text: "Ajouter",
29
          click: function() { $(this).dialog("close"); } }
30
        ]}
31
      );
32
    });
33
    $('#search-form input[type="checkbox"]').on('change', function () {
34
      $('#search-form').submit();
35
    });
36

    
37
  });
38
</script>
39
{% endblock %}
40

    
41
{% block appbar %}
42
<div id="appbar">
43
  <h2>Saisie des actes</h2>
44
  <a href="../..">Retourner à l'accueil</a>
45
  <button class="dialog-button"
46
          data-url="nouvel-acte/"
47
          data-default-button="Ajouter"
48
      >Ajouter un acte</button>
49
</div>
50
{% endblock %}
51

    
52

    
53
{% block content %}
54
<div id="sidebar">
55
  <form method="post" id="search-form">
56
    {% csrf_token %}
57
    <div>
58
      <h3>Rechercher dans les actes</h3>
59
      <h4>Patient</h4>
60
      {{ search_form.non_field_errors }}
61
      <label>Nom: {{ search_form.last_name }}</label>
62
      {{ search_form.last_name.errors }}
63
      <label>Numéro de dossier: {{ search_form.patient_record_id }}</label>
64
      {{ search_form.patient_record_id.errors }}
65
      <label>Numéro de sécu: {{ search_form.social_security_number }}</label>
66
      {{ search_form.social_security_number.errors }}
67
      <button>Rechercher</button>
68
      <h4>Thérapeute</h4>
69
      <label>Nom: {{ search_form.doctor_name }}</label>
70
      {{ search_form.doctor_name.errors }}
71
      <button>Rechercher</button>
72
    </div>
73
    <div id="filtre">
74
      <h3>Filtrer les actes</h3>
75
      {{ search_form.filters }}
76
    </div>
77
  </form>
78
</div>
79

    
80
<div class="content">
81
  {% include 'calebasse/datesel.html' %}
82
  <br/>
83

    
84
  <table id="actes" class="main">
85
    <thead>
86
    <tr>
87
      <th>Dossier</th>
88
      <th>État</th>
89
      <th>Type d'acte</th>
90
      <th>Validation</th>
91
      <th>Facturation</th>
92
      <th>Thérapeutes</th>
93
      <th>Heure</th>
94
      <th>Durée</th>
95
    </tr>
96
    </thead>
97
    <tbody>
98
      {% for act in object_list %}
99
      {% comment %}
100
      FIXME: comment mettre la classe non-factu ?
101
      <tr class="non-factu">
102
      {% endcomment %}
103
      <tr>
104
        <td>
105
            {{ act.patient.id }}
106
            {{ act.patient.first_name }}
107
            {{ act.patient.last_name }}
108
        </td>
109
        <td>FIXME: c'est quoi état ?</td>
110
        <td>({{ act.act_type.id }}) {{ act.act_type }}</td>
111
        <td>{{ act.get_state }}</td>
112
        <td>FIXME: facturation !!</td>
113
        <td>
114
            {% for doctor in act.doctors.all %}
115
            ({{ doctor.id }}) {{ doctor }}
116
            {% if not forloop.last %}
117
            <br/>
118
            {% endif %}
119
            {% endfor %}
120
        </td>
121
        <td>{{ act.start_time|date:"H:i" }}</td>
122
        <td>{{ act.duration }}</td>
123
      </tr>
124
    {% endfor %}
125
    <!--
126
    <tr>
127
      <td>1234 Bob Léponge</td>
128
      <td>Traitement</td>
129
      <td>(11) Ortophonie</td>
130
      <td>Validé</td>
131
      <td>123-123456</td>
132
      <td>(10) Peyrard</td>
133
      <td>17:15</td>
134
      <td>00:45</td>
135
    </tr>
136

    
137
    <tr class="non-factu">
138
      <td>2345 Cindy Lop</td>
139
      <td>Traitement</td>
140
      <td>(29) Travail perso</td>
141
      <td>Non facturable<br/>Validé</td>
142
      <td></td>
143
      <td>(62) Grangy<br/>(81) Blondiau</td>
144
      <td>10:00</td>
145
      <td>01:00</td>
146
    </tr>
147

    
148

    
149
    <tr class="non-factu">
150
      <td>3456 Mark Spencer</td>
151
      <td>Traitement</td>
152
      <td>(29) Travail perso</td>
153
      <td>Non facturable<br/>Absence non excusée</td>
154
      <td></td>
155
      <td>(62) Grangy<br/>(81) Blondiau</td>
156
      <td>11:00</td>
157
      <td>01:00</td>
158
    </tr>
159

    
160
    <tr>
161
      <td>4567 John Doe</td>
162
      <td>Diagnostic</td>
163
      <td>(10) Entretien</td>
164
      <td>Validé</td>
165
      <td>124-en cours</td>
166
      <td>(5) Roudon</td>
167
      <td>14:15</td>
168
      <td>00:45</td>
169
    </tr>
170

    
171
    <tr class="non-factu">
172
      <td>5678 Philippe Maurice</td>
173
      <td>Traitement</td>
174
      <td>(16) Groupe langage</td>
175
      <td>Validé</td>
176
      <td>Acte perdu</td>
177
      <td>(11) Douare</td>
178
      <td>14:00</td>
179
      <td>01:00</td>
180
    </tr>
181
    -->
182
    </tbody>
183
  </table>
184
</div>
185
{% endblock %}
186

    
187
{% block dialogs %}
188

    
189
<div id="acte-dlg" style="display: none;">
190
  <p>1234 Bob Leponge (Traitement)</p>
191
  <p><select><option>(11) Ortophonie</option></select></p>
192
  <p>8 août 2012 - 17:15 - 45 minutes</p>
193

    
194
  <table>
195
    <tr><td width="50%">
196
        <h4>Intervenants</h4>
197
        <div id="intervenants">
198
          <ul>
199
            <li><input type="checkbox" value="Bob Léponge" checked="checked">Bob Léponge</input></li>
200
            <li><input type="checkbox" value="Sandy Kilo" checked="checked">Sandy Kilo</input></li>
201
          </ul>
202
          <a href="#">Ajouter</a><br/>
203
          <a href="#">Tout le monde</a>
204
        </div>
205
      </td>
206

    
207
      <td width="50%">
208

    
209
        <ul>
210
          <li>Rendez-vous pris le 5 juillet 2012 à 10:36</li>
211
          <li>Acte validé le 10 août 2012 à 9h10</li>
212
          <li>En cours de facturation (123) <button class="flat">Acte perdu</button></li>
213
        </ul>
214
      </td>
215
    </tr>
216
  </table>
217

    
218
  <br/>
219
  <br/>
220
  <textarea cols="50">Bla bla bla</textarea>
221

    
222
</div>
223
{% endblock %}
    (1-1/1)