dossiers: make healthcare tab more significant.
This commit is contained in:
parent
09eb39f718
commit
d5ca00edf4
|
@ -296,11 +296,25 @@ $('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
|
|||
</p>
|
||||
{% if acts_losts %}
|
||||
<p><strong>{{ acts_losts|length }}</strong> actes facturables qui ne peuvent pas être facturés :
|
||||
<ul>
|
||||
{% for act in acts_losts %}
|
||||
<li>{{ act }}</li>
|
||||
{% endfor %}
|
||||
</ul></p>
|
||||
<table class="basic">
|
||||
<thead>
|
||||
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</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>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if acts_pause %}
|
||||
<p><strong>{{ acts_pause|length }}</strong> actes qui sont en pause :
|
||||
|
@ -311,7 +325,7 @@ $('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
|
|||
</ul></p>
|
||||
{% endif %}
|
||||
{% if hcs %}
|
||||
{% for hc, acts in hcs %}
|
||||
{% for hc, acts, acts_cared in hcs %}
|
||||
{% if hc.cmpphealthcarediagnostic %}
|
||||
<div id="patient-diag">
|
||||
<div class="frame">
|
||||
|
@ -323,24 +337,49 @@ $('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
|
|||
<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.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 %}
|
||||
<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>
|
||||
<ul>
|
||||
{% for act in acts %}
|
||||
<li>{{ act }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<table class="basic">
|
||||
<thead>
|
||||
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</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>
|
||||
</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>
|
||||
<ul>
|
||||
{% for act in hc.act_set.all %}
|
||||
<li>{{ act }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<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>
|
||||
|
@ -357,24 +396,50 @@ $('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
|
|||
<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.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 %}
|
||||
<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>
|
||||
<ul>
|
||||
{% for act in acts %}
|
||||
<li>{{ act }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<table class="basic">
|
||||
<thead>
|
||||
<tr> <th>Date</th> <th>Heure</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</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>
|
||||
</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>
|
||||
<ul>
|
||||
{% for act in hc.act_set.all %}
|
||||
<li>{{ act }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<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>
|
||||
|
|
|
@ -412,17 +412,21 @@ class PatientRecordView(cbv.ServiceViewMixin, cbv.MultiUpdateView):
|
|||
ctx['acts_losts'] = acts_losts
|
||||
ctx['acts_pause'] = acts_pause
|
||||
hcs_used = acts_per_hc.keys()
|
||||
hcs = None
|
||||
if not hcs_used:
|
||||
ctx['hcs'] = [(hc, None) for hc in HealthCare.objects.filter(patient=self.object).order_by('-start_date')]
|
||||
hcs = [(hc, None) for hc in HealthCare.objects.filter(patient=self.object).order_by('-start_date')]
|
||||
else:
|
||||
ctx['hcs'] = []
|
||||
hcs = []
|
||||
for hc in HealthCare.objects.filter(patient=self.object).order_by('-start_date'):
|
||||
acts = None
|
||||
if hasattr(hc, 'cmpphealthcarediagnostic') and hc.cmpphealthcarediagnostic in hcs_used:
|
||||
acts = acts_per_hc[hc.cmpphealthcarediagnostic]
|
||||
elif hasattr(hc, 'cmpphealthcaretreatment') and hc.cmpphealthcaretreatment in hcs_used:
|
||||
acts = acts_per_hc[hc.cmpphealthcaretreatment]
|
||||
ctx['hcs'].append((hc, acts))
|
||||
hcs.append((hc, acts))
|
||||
ctx['hcs'] = []
|
||||
for hc, acts in hcs:
|
||||
ctx['hcs'].append((hc, acts, hc.act_set.order_by('date', 'time')))
|
||||
elif ctx['object'].service.name == "CAMSP":
|
||||
if ctx['object'].last_state.status.type == "ACCUEIL":
|
||||
ctx['status'] = [STATES_BTN_MAPPER['FIN_ACCUEIL'],
|
||||
|
|
Reference in New Issue