dossiers: patient contact is not in adress frame (fixex #2172).

This commit is contained in:
Mikaël Ates 2013-01-06 23:37:07 +01:00
parent e20cf07ae4
commit 8e11918610
1 changed files with 99 additions and 1 deletions

View File

@ -57,9 +57,105 @@ $('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
</div>
<div id="tabs-3"> <!-- Adresses / Contacts -->
<form method="post" id="policyholder-form" class="patientrecordform">{% csrf_token %}
<div class="contact patient">
<h4>{% if object.gender == 1 %}M.{% elif object.gender == 2 %}Mme{% endif %}
{{ object.first_name }} <span class="lastname">{{ object.last_name }}</span> {% if object.id == object.id %} (PATIENT){% endif %}</h4>
<div class="right">Assuré
<input type="radio"
{% if object.policyholder.id == object.id %} checked="checked" {% endif %}
id="id_policyholder-policyholder_{{ object.id }}"
value="{{ object.id }}"
class="policyholder-radio"
name="policyholder-policyholder">
<button type="button" data-id="{{ object.id }}" class="update-contact-btn icon-edit" title="Modifier"></button>
</div>
<div>
<ul>
{% if object.parente %}
<li><label>Lien avec le patient :</label>
{{ object.parente }}</li>
{% endif %}
{% if object.mobile %}
<li>
<span class="icon-user-space">{{ object.mobile }} (perso)</span>
</li>
{% endif %}
{% if object.phone %}
<li>
<span class="icon-user-space">{{ object.phone }} (pro)</span>
</li>
{% endif %}
{% if object.email %}
<li>
<label>Courriel :</label>
{{ object.email }}
</li>
{% endif %}
{% if object.job %}
<li>
<label>Profession :</label>
{{ object.job }}
</li>
{% endif %}
{% if object.contact_comment %}
<li>
<label>Commentaire :</label>
{{ object.contact_comment }}
</li>
{% endif %}
<li><label>Données d'assuré social</label>
<!-- <button class="blind">détails</button>-->
<ul>
{% if object.social_security_id %}
<li><label>Numéro d'assuré social :</label>
{{ object.social_security_id }} {{ object.get_control_key }}</li>
{% endif %}
{% if object.birthdate %}
<li><label>Date de naissance :</label>
{{ object.birthdate }}</li>
{% endif %}
{% if object.birthplace %}
<li><label>Lieu de naissance :</label>
{{ object.birthplace }}</li>
{% endif %}
{% if object.begin_rights %}
<li><label>Début de droits :</label>
{{ object.begin_rights }}</li>
{% endif %}
{% if object.end_rights %}
<li><label>Fin de droits :</label>
{{ object.end_rights }}</li>
{% endif %}
{% if object.health_center %}
<li><label>Caisse :</label>
{{ object.health_center }}</li>
{% endif %}
{% if object.other_health_center %}
<li><label>Centre spécifique :</label>
{{ object.other_health_center }}</li>
{% endif %}
<li><label>Tiers-payant :</label>
{% if object.thirdparty_payer %}
Oui
{% else %}
Non
{% endif %}
</li>
{% if object.twinning_rank %}
<li><label>Rang (gémellité) :</label>
{{ object.twinning_rank }}</li>
{% endif %}
</ul>
</li>
</ul>
</div>
</div>
<button id="new-address-btn">Nouvelle adresse</button>
<button id="new-contact-btn">Nouveau contact</button>
<form method="post" id="policyholder-form" class="patientrecordform">{% csrf_token %}
{% for address in object.addresses.all %}
<div class="frame">
<h3>{% if not address.display_name %}Non renseigné{% else %}{{ address.display_name }}{% endif %}</h3>
@ -74,6 +170,7 @@ $('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
{% if address.comment %}<p><label>Commentaire :</label>{{ address.comment }}</p>{% endif %}
{% if not address.phone and not address.comment %}<p>&nbsp;<!-- intentionaly empty --></p>{% endif %}
{% for contact in address.patientcontact_set.all %}
{% if contact.id != object.id %}
<div class="contact{% if contact.id == object.id %} patient{% endif %}">
<h4>{% if contact.gender == 1 %}M.{% elif contact.gender == 2 %}Mme{% endif %}
{{ contact.first_name }} <span class="lastname">{{ contact.last_name }}</span> {% if contact.id == object.id %} (PATIENT){% endif %}</h4>
@ -164,6 +261,7 @@ $('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
</ul>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}