Projet

Général

Profil

Télécharger (9,22 ko) Statistiques
| Branche: | Tag: | Révision:

calebasse / calebasse / dossiers / templates / dossiers / patientrecord_tab2_fiche_adm.html @ f93684a4

1
<script type="text/javascript">
2
    warning_on_unsave_change();
3
    init_magic_dialog();
4
    $('#prescription-transport-btn').click(function() {
5
        $('#ajax-dlg').load('prescription-transport',
6
          function () {
7
             $(this).dialog({title: 'Prescription de transport', width: '800px',
8
                      buttons: [ { text: "Fermer",
9
                          click: function() { $(this).dialog("close"); } },
10
                      { text: "Prescrire",
11
                          click: function() { $("#ajax-dlg form").submit(); $(this).dialog("close"); } }]});
12
             $('.addresses input[type=radio]').first().click();
13
         });
14
         return false;
15
    });
16
    $('#new-protection-btn').click(function() {
17
        generic_ajaxform_dialog('protection/new', 'Ajouter une mesure de protection',
18
            '#ajax-dlg', '800px', 'Ajouter', null, add_datepickers);
19
    });
20
    $('.update-protection-btn').click(function() {
21
        generic_ajaxform_dialog('protection/' + $(this).data('id') + '/update', 'Modifier une mesure de protection',
22
            '#ajax-dlg', '800px', 'Modifier', null, add_datepickers);
23
    });
24
    $('.del-protection').click(function() {
25
        generic_ajaxform_dialog('protection/' + $(this).data('id') + '/del', 'Supprimer une mesure de protection',
26
            '#ajax-dlg', '500px', 'Supprimer');
27
    });
28
    $('input#id_id-birthdate').datepicker({dateFormat: 'd/m/yy', showOn: 'button' });
29
    calebasse_ajax_form('#tabs-2');
30
</script>
31
{% extends 'dossiers/patientrecord_tab.html' %}
32
{% load dossiers %}
33
{% block content %}
34
<div id="tabs-2">
35
  <form method="post" action="tab2" id="administrative-form" class="patientrecordform">{% csrf_token %}
36
    <p><button class="save enable-on-change">Enregistrer</button></p>
37
    <div class="frame inline">
38
      <h3>État civil</h3>
39
      <table class="basic">
40
        <tbody>
41
        {% get_fieldset last_name,first_name,birthplace,birthdate,gender,nationality as id_fields from form %}
42
        {% for field in id_fields %}
43
        <tr>
44
          <td class="width-limited">{{ field.label_tag }}</td>
45
          <td>{{ field }}</td>
46
          <td>{{ field.errors }}</td>
47
        </tr>
48
        {% endfor %}
49
        </tbody>
50
      </table>
51
      <input type="hidden"  name="tab"  value="1">
52
    </div>
53

    
54
    <div class="frame inline">
55
      <h3>Inscription</h3>
56
      <table class="basic">
57
        <tbody>
58
        {% get_fieldset analysemotive,familymotive,provenance,advicegiver,provenanceplace as inscription_fields from form %}
59
        {% for field in inscription_fields %}
60
        <tr><td class="width-limited">{{ field.label_tag }}</td><td>{{ field }}
61
            <button type="button"
62
              class="dialog-button"
63
              data-url="../../ressources/{{ field.name }}/new/ #form-content"
64
              data-default-button="Ajouter"
65
              data-next-url="{{ request.get_full_path }}#tab=1"
66
              data-add-select="#id_inscription-{{ field.name }}"
67
              title="Ajouter un {{ field.label.lower }}"
68
              type="button">+</button></td><td>{{ field.errors }}</td></tr>
69
        {% endfor %}
70
        </tbody>
71
      </table>
72
      <input type="hidden"  name="tab"  value="1">
73
    </div>
74

    
75
    <div class="frame inline">
76
      <h3>Sortie</h3>
77
      <table class="basic">
78
        <tbody>
79
        {% get_fieldset outmotive,outto as out_fields from form %}
80
        {% for field in out_fields %}
81
        <tr><td class="width-limited">{{ field.label_tag  }}</td><td>{{ field }}
82
            <button type="button"
83
              class="dialog-button"
84
              data-url="../../ressources/{{ field.name }}/new/ #form-content"
85
              data-default-button="Ajouter"
86
              data-next-url="{{ request.get_full_path }}#tab=1"
87
              data-add-select="#id_out-{{ field.name }}"
88
              title="Ajouter un {{ field.label.lower }}"
89
              type="button">+</button></td><td>{{ field.errors }}</td></tr>
90
        {% endfor %}
91
        </tbody>
92
      </table>
93
      <input type="hidden"  name="tab"  value="1">
94
    </div>
95

    
96
    <div class="frame inline">
97
      <h3>Famille</h3>
98
      <table class="basic">
99
        <tbody>
100
        <tr><td class="width-limited">{{ form.sibship_place.label_tag  }}</td><td>{{ form.sibship_place }}</td><td>{{ form.sibship_place.errors }}</td></tr>
101
        <tr><td class="width-limited">{{ form.nb_children_family.label_tag  }}</td><td>{{ form.nb_children_family }}</td><td>{{ form.nb_children_family.errors }}</td></tr>
102
        <tr><td class="width-limited"><label>Rang (gémellité) :  </label></td><td>{{ object.twinning_rank|default_if_none:"Aucun" }}</td><td></td></tr>
103
        {% get_fieldset parental_authority,family_situation,child_custody,job_mother,job_father,rm_mother,rm_father as familly_fields from form %}
104
        {% for field in familly_fields %}
105
        <tr>
106
          <td class="width-limited">{{ field.label_tag }}</td><td>{{ field }}
107
            <button type="button"
108
              class="dialog-button"
109
              data-url="../../ressources/parentalauthoritytype/new/ #form-content"
110
              data-default-button="Ajouter"
111
              data-next-url="{{ request.get_full_path }}#tab=1"
112
              data-add-select="#id_family-parental_authority"
113
              title="Ajouter {{ field.label.lower }}">+</button></td><td>{{ field.errors }}</td>
114
        </tr>
115
        {% endfor %}
116
        <tr><td class="width-limited">{{ form.family_comment.label_tag  }}</td><td>{{ form.family_comment }}</td><td>{{ form.family_comment.errors }}</td></tr>
117
        </tbody>
118
      </table>
119
      <input type="hidden"  name="tab"  value="1">
120
    </div>
121

    
122
    <div class="frame inline">
123
      <h3>Transport</h3>
124
      <table class="basic">
125
        <tbody>
126
        {% get_fieldset transporttype,transportcompany,simple_appointment_transport,periodic_appointment_transport as transport_fields from form %}
127
        {% for field in transport_fields %}
128
        <tr><td class="width-limited">{{ field.label_tag }}</td><td>{{ field }}
129
            <button type="button"
130
              class="dialog-button"
131
              data-url="../../ressources/{{ field.name }}/new/ #form-content"
132
              data-default-button="Ajouter"
133
              data-next-url="{{ request.get_full_path }}#tab=1"
134
              data-add-select="#id_transport-{{ field.name }}"
135
              title="Ajouter {% if field.label.lower == "type de transport" %}un{% else %}une{% endif %} {{ field.label.lower }}">+</button></td><td>{{ field.errors }}</td></tr>
136
        {% endfor %}
137
        </tbody>
138
      </table>
139
      <br/>
140
      <table>
141
        <tr>
142
          <td><!--<button id="attestation-transport-btn">Attestation de transport</button>--></td><td><button id="prescription-transport-btn">Prescription de transport</button></td>
143
        </tr>
144
        <tr>
145
          <td></td>
146
          <td>{% if last_prescription %} Dernière prescription le {{ last_prescription.created }}{% endif %}</td>
147
        </tr>
148
      </table>
149
    </div>
150

    
151
    <div class="frame inline">
152
      <h3>Suivi du patient</h3>
153
      <table class="basic">
154
        <tbody>
155
        <tr><td class="width-limited">{{ form.coordinators.label_tag  }}</td><td>{{ form.coordinators }}</td><td>{{ form.coordinators.errors }}</td></tr>
156
        <tr><td class="width-limited">{{ form.externaldoctor.label_tag  }}</td><td>{{ form.externaldoctor }}
157
            <button type="button"
158
              class="dialog-button"
159
              data-url="../../personnes/externaltherapist/new/ #form-content"
160
              data-default-button="Ajouter"
161
              data-next-url="{{ request.get_full_path }}#tab=1"
162
              data-add-select="#id_followup-externaldoctor"
163
              title="Ajouter un médecin extérieur">+</button></td><td>{{ form.externaldoctor.errors }}</td></tr>
164
        <tr><td class="width-limited">{{ form.externalintervener.label_tag  }}</td><td>{{ form.externalintervener }}
165
            <button type="button"
166
              class="dialog-button"
167
              data-url="../../personnes/externalworker/new/ #form-content"
168
              data-default-button="Ajouter"
169
              data-next-url="{{ request.get_full_path }}#tab=1"
170
              data-add-select="#id_followup-externalintervener"
171
              title="Ajouter un intervenant extérieur">+</button></td><td>{{ form.externalintervener.errors }}</td></tr>
172
        </tbody>
173
      </table>
174
    </div>
175
    <input type="hidden"  name="tab"  value="1">
176
    <p><button class="save enable-on-change">Enregistrer</button></p>
177
  </form>
178

    
179
  <div class="frame">
180
    <h3>Mesures de protection</h3>
181
    <p><button id="new-protection-btn">Nouvelle mesure de protection</button></p>
182
    {% for protection in object.protectionstate_set.all %}
183
    <div class="subframe">
184
      Depuis le {{ protection.start_date }} : {{ protection.status.name }}
185
      <div class="buttons">
186
        <button type="button" data-id="{{ protection.id }}" class="del-protection icon-minus" title="Supprimer"></button>
187
        <button type="button" data-id="{{ protection.id }}" class="update-protection-btn icon-edit" title="Modifier"></button>
188
      </div>
189
      <div>
190
        <ul>
191
          {% if protection.end_date %}<li><label>Date de fin</label> : {{ protection.end_date }}</li>{% endif %}
192
          {% if protection.comment %}<li><label>Commentaire</label> : {{ protection.comment }}</li>{% endif %}
193
        </ul>
194
      </div>
195
    </div>
196
    {% endfor %}
197
  </div>
198
</div>
199
{% endblock %}
(16-16/31)