1 |
54318d2c
|
Serghei MIHAI
|
{% extends 'dossiers/patientrecord_tab.html' %}
|
2 |
b773431d
|
Jérôme Schneider
|
{% load dossiers %}
|
3 |
54318d2c
|
Serghei MIHAI
|
{% block content %}
|
4 |
aa31cdc8
|
Jérôme Schneider
|
<div id="tabs-3">
|
5 |
|
|
<form method="post" action="tab3" id="policyholder-form" class="patientrecordform">{% csrf_token %}
|
6 |
ab23c119
|
Jérôme Schneider
|
<p>
|
7 |
|
|
{% if nb_place_of_lifes == 1 %}
|
8 |
|
|
<span>Un lieu de vie unique est indiqué</span>
|
9 |
|
|
{% elif nb_place_of_lifes > 1 %}
|
10 |
|
|
<span class="highlight">Il y a {{ nb_place_of_lifes }} lieux de vie d'indiqués</span>
|
11 |
|
|
{% else %}
|
12 |
|
|
<span class="highlight">Aucun lieu de vie d'indiqué</span>
|
13 |
|
|
{% endif %}
|
14 |
|
|
</p>
|
15 |
|
|
<p>
|
16 |
|
|
<label>Commentaire <button class="save enable-on-change btn-maj">✔</button></label>
|
17 |
|
|
{{ forms.policyholder.contact_comment }}
|
18 |
|
|
</p>
|
19 |
|
|
<p>
|
20 |
|
|
<button type="button" id="new-address-btn" class="icon-home-space">Nouvelle adresse</button>
|
21 |
|
|
<button type="button" id="new-contact-btn" class="icon-user-space">Nouveau contact</button>
|
22 |
|
|
</p>
|
23 |
eb3a7e71
|
Jérôme Schneider
|
|
24 |
aa31cdc8
|
Jérôme Schneider
|
<div class="contact patient">
|
25 |
ab23c119
|
Jérôme Schneider
|
<h4 class="icon-user-space">Patient</h4>
|
26 |
aa31cdc8
|
Jérôme Schneider
|
<div class="right">Assuré
|
27 |
|
|
<input type="radio"
|
28 |
|
|
{% if object.policyholder.id == object.id %} checked="checked" {% endif %}
|
29 |
|
|
id="id_policyholder-policyholder_{{ object.id }}"
|
30 |
|
|
value="{{ object.id }}"
|
31 |
|
|
class="policyholder-radio"
|
32 |
|
|
name="policyholder-policyholder">
|
33 |
|
|
<button type="button" data-id="{{ object.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
|
34 |
|
|
</div>
|
35 |
|
|
<div>
|
36 |
|
|
{% include "dossiers/patientrecord_tab3_contact.html" with contact=object %}
|
37 |
|
|
</div>
|
38 |
eb3a7e71
|
Jérôme Schneider
|
</div>
|
39 |
|
|
|
40 |
aa31cdc8
|
Jérôme Schneider
|
{% for contact in object.contacts.all %}
|
41 |
eb3a7e71
|
Jérôme Schneider
|
{% if not contact.addresses.all %}
|
42 |
|
|
<div class="contact">
|
43 |
aa31cdc8
|
Jérôme Schneider
|
<h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
|
44 |
|
|
{{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
|
45 |
|
|
<div class="right">Assuré
|
46 |
|
|
<input type="radio"
|
47 |
|
|
{% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
|
48 |
|
|
id="id_policyholder-policyholder_{{ contact.id }}"
|
49 |
|
|
value="{{ contact.id }}"
|
50 |
|
|
class="policyholder-radio"
|
51 |
|
|
name="policyholder-policyholder">
|
52 |
|
|
<button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
|
53 |
|
|
<button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
|
54 |
|
|
</div>
|
55 |
|
|
<div>
|
56 |
|
|
{% include "dossiers/patientrecord_tab3_contact.html" %}
|
57 |
a4728b91
|
Jérôme Schneider
|
</div>
|
58 |
aa31cdc8
|
Jérôme Schneider
|
</div>
|
59 |
|
|
{% endif %}
|
60 |
eb3a7e71
|
Jérôme Schneider
|
{% endfor %}
|
61 |
|
|
{% for address in addresses %}
|
62 |
c69fac80
|
Jérôme Schneider
|
<div class="frame {% if address.place_of_life %}orange{% endif %}">
|
63 |
d5dff17c
|
Jérôme Schneider
|
<h3 class="icon-home-space">{{ address }}</h3>
|
64 |
aa31cdc8
|
Jérôme Schneider
|
<div class="buttons">
|
65 |
|
|
<button type="button" data-id="{{ address.id }}" class="del-address icon-minus" title="Supprimer"></button>
|
66 |
|
|
<button type="button" data-id="{{ address.id }}" class="update-address-btn icon-edit" title="Modifier"></button>
|
67 |
|
|
</div>
|
68 |
|
|
<div class="right">
|
69 |
|
|
<ul class="ajax_messages" style="display: none;"></ul>
|
70 |
|
|
<input type="checkbox" data-id="{{ address.id }}" class="place_of_life" {% if address.place_of_life %}checked{% endif %}>Lieu de vie</input>
|
71 |
|
|
</div>
|
72 |
b773431d
|
Jérôme Schneider
|
{% if address.phone %}<p><span class="icon-phone">{{ address.phone|phone }}</span></p>{% endif %}
|
73 |
aa31cdc8
|
Jérôme Schneider
|
{% if address.comment %}<p><label>Commentaire :</label>{{ address.comment }}</p>{% endif %}
|
74 |
|
|
{% if not address.phone and not address.comment %}<p> <!-- intentionaly empty --></p>{% endif %}
|
75 |
|
|
{% for contact in address.patientcontact_set.all %}
|
76 |
|
|
{% if contact.id != object.id %}
|
77 |
|
|
<div class="contact">
|
78 |
d5dff17c
|
Jérôme Schneider
|
<h4 class="icon-user-space">{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
|
79 |
aa31cdc8
|
Jérôme Schneider
|
{{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
|
80 |
|
|
<div class="right">Assuré
|
81 |
|
|
<input type="radio"
|
82 |
|
|
{% if object.policyholder.id == contact.id %} checked="checked" {% endif %}
|
83 |
|
|
id="id_policyholder-policyholder_{{ contact.id }}"
|
84 |
|
|
value="{{ contact.id }}"
|
85 |
|
|
class="policyholder-radio"
|
86 |
|
|
name="policyholder-policyholder">
|
87 |
|
|
<button type="button" data-id="{{ contact.id }}" data-address-id="{{ address.id }}" class="del-contact icon-minus" title="Supprimer"></button>
|
88 |
|
|
<button type="button" data-id="{{ contact.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
|
89 |
eb3a7e71
|
Jérôme Schneider
|
</div>
|
90 |
aa31cdc8
|
Jérôme Schneider
|
<div>
|
91 |
|
|
{% include "dossiers/patientrecord_tab3_contact.html" %}
|
92 |
eb3a7e71
|
Jérôme Schneider
|
</div>
|
93 |
aa31cdc8
|
Jérôme Schneider
|
</ul>
|
94 |
|
|
</span>
|
95 |
|
|
</div>
|
96 |
|
|
{% endif %}
|
97 |
|
|
{% endfor %}
|
98 |
|
|
</div>
|
99 |
|
|
{% endfor %}
|
100 |
a4728b91
|
Jérôme Schneider
|
</form>
|
101 |
aa31cdc8
|
Jérôme Schneider
|
</div>
|
102 |
54318d2c
|
Serghei MIHAI
|
{% endblock %}
|