patientrecord: split templates by tab

This commit is contained in:
Jérôme Schneider 2014-03-27 10:53:37 +01:00
parent 8d70dd0400
commit 88d84c735d
6 changed files with 349 additions and 344 deletions

View File

@ -0,0 +1,215 @@
{% if object.service.name == "CMPP" %}
<div class="notifs">
<h4>Information sur la prise en charge</h4>
<ul>
<li><span{% if hc_status.1 %} id="highlight"{% endif %}>{{ hc_status.0 }}</span></li>
{% if object.pause %}<li><span id="highlight">Le dossier est en pause facturation.</span></li>{% endif %}
{% if missing_policy %}<li><span id="highlight">Informations d'assuré sociale manquantes.</span></li>{% endif %}
{% if missing_birthdate %}<li><span id="highlight">Date de naissance manquante.</span></li>{% endif %}
{% if object.policyholder.ame %}<li><span id="highlight">Le contact assuré est AME.</span></li>{% endif %}
</div>
<p>
<button id="new-hcdiag-btn">Nouvelle PC diagnostic</button>
<button id="new-hctrait-btn">Nouvelle PC traitement</button>
</p>
{% if acts_losts %}
<p><strong>{{ acts_losts|length }}</strong> actes facturables qui ne peuvent pas être facturés :
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts_losts %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
{% endif %}
{% if acts_pause %}
<p><strong>{{ acts_pause|length }}</strong> actes qui sont en pause :
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts_pause %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
{% endif %}
{% if hcs %}
{% for hc, acts, acts_cared in hcs %}
{% if hc.cmpphealthcarediagnostic %}
<div id="patient-diag">
<div class="frame">
<div class="buttons">
<button type="button" data-id="{{ hc.id }}" class="del-hcdiag icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ hc.id }}" class="update-hcdiag-btn icon-edit" title="Modifier"></button>
</div>
<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>
<ul>
{% if hc.cmpphealthcarediagnostic.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcarediagnostic.end_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
<li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcarediagnostic.get_act_number }}</strong></li>
{% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if hc.get_nb_acts_cared %}
<li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
</thead>
<tbody>
{% for act in acts_cared %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}<li>Aucun acte facturé.</li>
{% endif %}
</ul>
</div>
</div>
{% else %}
<div id="patient-traitement">
<div class="frame">
<div class="buttons">
<button type="button" data-id="{{ hc.id }}" class="del-hctrait icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ hc.id }}" class="update-hctrait-btn icon-edit" title="Modifier"></button>
</div>
<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>
<ul>
{% if hc.cmpphealthcaretreatment.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcaretreatment.end_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
<li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcaretreatment.get_act_number }}</strong></li>
{% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if hc.get_nb_acts_cared %}
<li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
</thead>
<tbody>
{% for act in acts_cared %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}<li>Aucun acte facturé.</li>
{% endif %}
</ul>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if object.service.name == "SESSAD TED" or object.service.name == "SESSAD DYS" %}
<p>
<button id="new-notification-btn">Nouvelle notification</button>
</p>
{% if hcs %}
{% for hc in hcs %}
{% if hc.sessadhealthcarenotification %}
<div id="patient-diag">
<div class="frame">
<div class="buttons">
<button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="del-notification icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="update-notification-btn icon-edit" title="Modifier"></button>
</div>
<h3>Notification</h3>
<ul>
{% if hc.start_date %}<li><label>Date de début</label> : {{ hc.start_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.sessadhealthcarenotification.end_date %}<li><label>Date de fin</label> : {{ hc.sessadhealthcarenotification.end_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.agree_date %}<li><label>Date d'accord</label> : {{ hc.agree_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.insist_date %}<li><label>Date de relance</label> : {{ hc.insist_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
</ul>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}

View File

@ -0,0 +1,27 @@
{% for state, last_rdvs in history %}
<div class="frame">
<h3>{{ state.status.name }} depuis le {{ state.date_selected|date:"SHORT_DATE_FORMAT" }}</h3>
{% if last_rdvs %}
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
</thead>
<tbody>
{% for act, state, missing_workers in last_rdvs %}
<tr>
<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>
<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>
<td>{{ act.act_type }}</td>
<td class="width-limited">{% for doctor in act.doctors.all %}
{% if doctor in missing_workers %}<span class="absent" title="Absent">{% endif %}
{{ doctor.first_name }} <span class="lastname">{{ doctor.last_name }}</span>
{% if doctor in missing_workers %}</span>{% endif %}
{% endfor %}</td>
<td class="width-limited">{% if act.comment %}{{ act.comment }}{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
{% endfor %}

View File

@ -0,0 +1,24 @@
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> </tr>
</thead>
<tbody>
{% for event, state, missing_participants in next_rdvs %}
<tr>
<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>
<td>{% if state %}{% if state.state_name != 'VALIDE' %}<strong>{% endif %}{{ state }}{% if state.state_name != 'VALIDE' %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td>
<td>{{ event.act_type }}</td>
<td class="width-limited">{% for participant in event.participants.all %}
{% if participant in missing_participants %}<span class="absent" title="Absent">{% endif %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% if participant in missing_participants %}</span>{% endif %}
{% endfor %}</td>
{% if event.act.id %}
<td class="width-limited">{{ event.act.comment }}</td>
{% else %}
<td class="width-limited">{{ event.description }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -0,0 +1,60 @@
<div class="frame">
<h3>Périodes de socialisation</h3>
<p><button id="new-socialisation-duration-btn">Nouvelle période de socialisation</button></p>
{% for duration in object.socialisation_durations.all %}
<div class="subframe">
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 %}
<div class="buttons">
<button type="button" data-id="{{ duration.id }}" class="del-duration icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ duration.id }}" class="update-duration-btn icon-edit" title="Modifier"></button>
</div>
<div>
<ul>
{% if duration.end_date %}<li><label>Date de départ</label> : {{ duration.end_date }}</li>{% endif %}
{% if duration.comment %}<li><label>Commentaire</label> : {{ duration.comment }}</li>{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
<div class="frame">
<h3>Demandes MDPH</h3>
<p><button id="new-mdph-request-btn">Nouvelle demande MDPH</button></p>
{% for request in object.mdph_requests.all %}
<div class="subframe">
Demande le <strong>{{ request.start_date }}</strong> à la MDPH <strong>{{ request.mdph }}</strong>
<div class="buttons">
<button type="button" data-id="{{ request.id }}" class="del-mdph-request icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ request.id }}" class="update-mdph-request-btn icon-edit" title="Modifier"></button>
</div>
<div>
<ul>
{% if request.comment %}<li><label>Commentaire</label> : {{ request.comment }}</li>{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
<div class="frame">
<h3>Réponses MDPH</h3>
<p><button id="new-mdph-response-btn">Nouvelle réponse MDPH</button></p>
{% for response in object.mdph_responses.all %}
<div class="subframe">
Du <strong>{{ response.start_date }}</strong> au <strong>{{ response.end_date }}</strong> à la MDPH <strong>{{ response.mdph }}</strong>
<div class="buttons">
<button type="button" data-id="{{ response.id }}" class="del-mdph-response icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ response.id }}" class="update-mdph-response-btn icon-edit" title="Modifier"></button>
</div>
<div>
<ul>
{% if response.comment %}<li><label>Commentaire</label> : {{ response.comment }}</li>{% endif %}
{% if response.type_aide %}<li><label>Type d'aide</label> : {{ response.type_aide }}</li>{% endif %}
{% if response.name %}<li><label>Nom</label> : {{ response.name }}</li>{% endif %}
{% if response.rate %}<li><label>Taux</label> : {{ response.rate }}</li>{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>

View File

@ -0,0 +1,16 @@
<form method="post" id="physiology-form" class="patientrecordform">
{% csrf_token %}
<button class="save enable-on-change">Enregistrer</button>
{% for field in forms.physiology %}
<p>
{{ field.errors }}
</p>
<p>
{{ field.label_tag }}
{{ field }}
</p>
{% endfor %}
</p>
<input type="hidden" name="tab" value="7">
<button class="save enable-on-change">Enregistrer</button>
</form>

View File

@ -51,361 +51,24 @@
</div>
<div id="tabs-4"> <!-- Prise en charge et notifications -->
{% if object.service.name == "CMPP" %}
<div class="notifs">
<h4>Information sur la prise en charge</h4>
<ul>
<li><span{% if hc_status.1 %} id="highlight"{% endif %}>{{ hc_status.0 }}</span></li>
{% if object.pause %}<li><span id="highlight">Le dossier est en pause facturation.</span></li>{% endif %}
{% if missing_policy %}<li><span id="highlight">Informations d'assuré sociale manquantes.</span></li>{% endif %}
{% if missing_birthdate %}<li><span id="highlight">Date de naissance manquante.</span></li>{% endif %}
{% if object.policyholder.ame %}<li><span id="highlight">Le contact assuré est AME.</span></li>{% endif %}
</div>
<p>
<button id="new-hcdiag-btn">Nouvelle PC diagnostic</button>
<button id="new-hctrait-btn">Nouvelle PC traitement</button>
</p>
{% if acts_losts %}
<p><strong>{{ acts_losts|length }}</strong> actes facturables qui ne peuvent pas être facturés :
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts_losts %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
{% endif %}
{% if acts_pause %}
<p><strong>{{ acts_pause|length }}</strong> actes qui sont en pause :
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts_pause %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
{% endif %}
{% if hcs %}
{% for hc, acts, acts_cared in hcs %}
{% if hc.cmpphealthcarediagnostic %}
<div id="patient-diag">
<div class="frame">
<div class="buttons">
<button type="button" data-id="{{ hc.id }}" class="del-hcdiag icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ hc.id }}" class="update-hcdiag-btn icon-edit" title="Modifier"></button>
</div>
<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>
<ul>
{% if hc.cmpphealthcarediagnostic.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcarediagnostic.end_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
<li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcarediagnostic.get_act_number }}</strong></li>
{% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if hc.get_nb_acts_cared %}
<li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
</thead>
<tbody>
{% for act in acts_cared %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}<li>Aucun acte facturé.</li>
{% endif %}
</ul>
</div>
</div>
{% else %}
<div id="patient-traitement">
<div class="frame">
<div class="buttons">
<button type="button" data-id="{{ hc.id }}" class="del-hctrait icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ hc.id }}" class="update-hctrait-btn icon-edit" title="Modifier"></button>
</div>
<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>
<ul>
{% if hc.cmpphealthcaretreatment.end_date %}<li><label>Date de fin</label> : {{ hc.cmpphealthcaretreatment.end_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
<li><label>Nombres d'actes de la prise en charge</label> : <strong>{{ hc.cmpphealthcaretreatment.get_act_number }}</strong></li>
{% if acts %}<li><strong>{{ acts|length }}</strong> actes pouvant être pris en charge lors de la prochaine facturation :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> <th>Refacturation</th></tr>
</thead>
<tbody>
{% for act in acts %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
<td>{% for i in act.invoice_set.all %}{{ i.number }}{% if not forloop.last %} - {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if hc.get_nb_acts_cared %}
<li><strong>{{ hc.get_nb_acts_cared }}</strong> actes déja facturés :</li>
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Heure</th> <th>N° facture</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
</thead>
<tbody>
{% for act in acts_cared %}
<tr>
<td>{{ act.date|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ act.time }}</td>
<td>{{ act.get_invoice_number|default_if_none:"Ancienne facturation" }}</td>
<td>{{ act.act_type }}</td>
<td>{% for participant in act.doctors.all %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% endfor %}</td>
<td>{{ act.comment|default_if_none:"" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}<li>Aucun acte facturé.</li>
{% endif %}
</ul>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if object.service.name == "SESSAD TED" or object.service.name == "SESSAD DYS" %}
<p>
<button id="new-notification-btn">Nouvelle notification</button>
</p>
{% if hcs %}
{% for hc in hcs %}
{% if hc.sessadhealthcarenotification %}
<div id="patient-diag">
<div class="frame">
<div class="buttons">
<button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="del-notification icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ hc.sessadhealthcarenotification.id }}" class="update-notification-btn icon-edit" title="Modifier"></button>
</div>
<h3>Notification</h3>
<ul>
{% if hc.start_date %}<li><label>Date de début</label> : {{ hc.start_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.sessadhealthcarenotification.end_date %}<li><label>Date de fin</label> : {{ hc.sessadhealthcarenotification.end_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.request_date %}<li><label>Date de demande</label> : {{ hc.request_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.agree_date %}<li><label>Date d'accord</label> : {{ hc.agree_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.insist_date %}<li><label>Date de relance</label> : {{ hc.insist_date|date:"d/m/Y" }}</li>{% endif %}
{% if hc.comment %}<li><label>Commentaire</label> : {{ hc.comment }}</li>{% endif %}
</ul>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% include "dossiers/patientrecord_tab4_notifs.html" %}
</div>
<div id="tabs-5"> <!-- Actes passés -->
{% for state, last_rdvs in history %}
<div class="frame">
<h3>{{ state.status.name }} depuis le {{ state.date_selected|date:"SHORT_DATE_FORMAT" }}</h3>
{% if last_rdvs %}
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th></tr>
</thead>
<tbody>
{% for act, state, missing_workers in last_rdvs %}
<tr>
<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>
<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>
<td>{{ act.act_type }}</td>
<td class="width-limited">{% for doctor in act.doctors.all %}
{% if doctor in missing_workers %}<span class="absent" title="Absent">{% endif %}
{{ doctor.first_name }} <span class="lastname">{{ doctor.last_name }}</span>
{% if doctor in missing_workers %}</span>{% endif %}
{% endfor %}</td>
<td class="width-limited">{% if act.comment %}{{ act.comment }}{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
{% endfor %}
{% include "dossiers/patientrecord_tab5_actes_passes.html" %}
</div>
<div id="tabs-6"> <!-- Prochains rendez-vous -->
<table class="basic">
<thead>
<tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> </tr>
</thead>
<tbody>
{% for event, state, missing_participants in next_rdvs %}
<tr>
<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>
<td>{% if state %}{% if state.state_name != 'VALIDE' %}<strong>{% endif %}{{ state }}{% if state.state_name != 'VALIDE' %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td>
<td>{{ event.act_type }}</td>
<td class="width-limited">{% for participant in event.participants.all %}
{% if participant in missing_participants %}<span class="absent" title="Absent">{% endif %}
{{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
{% if participant in missing_participants %}</span>{% endif %}
{% endfor %}</td>
{% if event.act.id %}
<td class="width-limited">{{ event.act.comment }}</td>
{% else %}
<td class="width-limited">{{ event.description }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% include "dossiers/patientrecord_tab6_next_rdv.html" %}
</div>
<div id="tabs-7">
<div class="frame">
<h3>Périodes de socialisation</h3>
<p><button id="new-socialisation-duration-btn">Nouvelle période de socialisation</button></p>
{% for duration in object.socialisation_durations.all %}
<div class="subframe">
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 %}
<div class="buttons">
<button type="button" data-id="{{ duration.id }}" class="del-duration icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ duration.id }}" class="update-duration-btn icon-edit" title="Modifier"></button>
</div>
<div>
<ul>
{% if duration.end_date %}<li><label>Date de départ</label> : {{ duration.end_date }}</li>{% endif %}
{% if duration.comment %}<li><label>Commentaire</label> : {{ duration.comment }}</li>{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
<div class="frame">
<h3>Demandes MDPH</h3>
<p><button id="new-mdph-request-btn">Nouvelle demande MDPH</button></p>
{% for request in object.mdph_requests.all %}
<div class="subframe">
Demande le <strong>{{ request.start_date }}</strong> à la MDPH <strong>{{ request.mdph }}</strong>
<div class="buttons">
<button type="button" data-id="{{ request.id }}" class="del-mdph-request icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ request.id }}" class="update-mdph-request-btn icon-edit" title="Modifier"></button>
</div>
<div>
<ul>
{% if request.comment %}<li><label>Commentaire</label> : {{ request.comment }}</li>{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
<div class="frame">
<h3>Réponses MDPH</h3>
<p><button id="new-mdph-response-btn">Nouvelle réponse MDPH</button></p>
{% for response in object.mdph_responses.all %}
<div class="subframe">
Du <strong>{{ response.start_date }}</strong> au <strong>{{ response.end_date }}</strong> à la MDPH <strong>{{ response.mdph }}</strong>
<div class="buttons">
<button type="button" data-id="{{ response.id }}" class="del-mdph-response icon-minus" title="Supprimer"></button>
<button type="button" data-id="{{ response.id }}" class="update-mdph-response-btn icon-edit" title="Modifier"></button>
</div>
<div>
<ul>
{% if response.comment %}<li><label>Commentaire</label> : {{ response.comment }}</li>{% endif %}
{% if response.type_aide %}<li><label>Type d'aide</label> : {{ response.type_aide }}</li>{% endif %}
{% if response.name %}<li><label>Nom</label> : {{ response.name }}</li>{% endif %}
{% if response.rate %}<li><label>Taux</label> : {{ response.rate }}</li>{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
<div id="tabs-7"><!-- Période de socialisation -->
{% include "dossiers/patientrecord_tab7_socialisation.html" %}
</div>
<div id="tabs-8">
<form method="post" id="physiology-form" class="patientrecordform">
{% csrf_token %}
<button class="save enable-on-change">Enregistrer</button>
{% for field in forms.physiology %}
<p>
{{ field.errors }}
</p>
<p>
{{ field.label_tag }}
{{ field }}
</p>
{% endfor %}
</p>
<input type="hidden" name="tab" value="7">
<button class="save enable-on-change">Enregistrer</button>
</form>
<div id="tabs-8"><!-- Données à caractère médicale -->
{% include "dossiers/patientrecord_tab8_medical.html" %}
</div>
</div>
</div>