|
{% extends "calebasse/base.html" %}
|
|
|
|
{% load url from future %}
|
|
|
|
{% block extrascripts %}
|
|
{{ block.super }}
|
|
<script src="{{ STATIC_URL }}js/calebasse.datesel.js"></script>
|
|
<script src="{{ STATIC_URL }}js/calebasse.dialog.js"></script>
|
|
<script>
|
|
$(function() {
|
|
$('table#actes tr').click(function() {
|
|
generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
|
|
'#acte-dlg', '500px', 'Enregistrer', '..');
|
|
});
|
|
$('.date').datepicker();
|
|
$('#new-acte').click(function() {
|
|
$('#new-acte-dlg').dialog({title: 'Nouvel acte',
|
|
width: '550px',
|
|
buttons: [ { text: "Fermer",
|
|
click: function() { $(this).dialog("close"); } },
|
|
{ text: "Ajouter",
|
|
click: function() { $(this).dialog("close"); } }
|
|
]}
|
|
);
|
|
});
|
|
$('#search-form input[type="checkbox"]').on('change', function () {
|
|
$('#search-form').submit();
|
|
});
|
|
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block header %}
|
|
{{ block.super }}
|
|
<span>Actes - {{ service_name }}</spam>
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
<div id="appbar">
|
|
<h2>Saisie des actes</h2>
|
|
<a href="../..">Retourner à l'accueil</a>
|
|
<button class="dialog-button"
|
|
data-url="nouvel-acte/"
|
|
data-default-button="Ajouter"
|
|
>Ajouter un acte</button>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
<div id="sidebar">
|
|
<form method="get" id="search-form">
|
|
<div>
|
|
<h3>Rechercher dans les actes</h3>
|
|
<h4>Patient</h4>
|
|
{{ search_form.non_field_errors }}
|
|
<label>Nom: {{ search_form.last_name }}</label>
|
|
{{ search_form.last_name.errors }}
|
|
<label>Numéro de dossier: {{ search_form.patient_record_id }}</label>
|
|
{{ search_form.patient_record_id.errors }}
|
|
<label>Numéro de sécu: {{ search_form.social_security_number }}</label>
|
|
{{ search_form.social_security_number.errors }}
|
|
<button>Rechercher</button>
|
|
<h4>Intervenant</h4>
|
|
<label>Nom: {{ search_form.doctor_name }}</label>
|
|
{{ search_form.doctor_name.errors }}
|
|
<button>Rechercher</button>
|
|
</div>
|
|
<div id="filtre">
|
|
<h3>Filtrer les actes</h3>
|
|
{{ search_form.filters }}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="content">
|
|
{% include 'calebasse/datesel.html' %}
|
|
<br/>
|
|
|
|
<table id="actes" class="main">
|
|
<thead>
|
|
<tr>
|
|
<th>Dossier</th>
|
|
<th>État</th>
|
|
<th>Type d'acte</th>
|
|
<th>Validé</th>
|
|
<th>Facturé</th>
|
|
<th>Intervenants</th>
|
|
<th>Heure</th>
|
|
<th>Durée</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for act in object_list %}
|
|
{% comment %}
|
|
FIXME: comment mettre la classe non-factu ?
|
|
<tr class="non-factu">
|
|
{% endcomment %}
|
|
<tr data-id="{{ act.id }}">
|
|
<td>
|
|
{{ act.patient.id }}
|
|
{{ act.patient.first_name }}
|
|
<span class="lastname">{{ act.patient.last_name }}</span>
|
|
</td>
|
|
<td>{{ act.get_state }}</td>
|
|
<td>({{ act.act_type.id }}) {{ act.act_type }}</td>
|
|
<td>{{ act.valide|yesno:"Oui,Non," }}</td>
|
|
<td>{{ act.is_billed|yesno:"Oui,Non,None" }}</td>
|
|
<td>
|
|
{% for doctor in act.doctors.all %}
|
|
({{ doctor.id }}) {{ doctor }}
|
|
{% if not forloop.last %}
|
|
<br/>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<td>{{ act.time|date:"H:i" }}</td>
|
|
<td>{{ act.duration }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block dialogs %}
|
|
|
|
<div id="acte-dlg" style="display: none;"></div>
|
|
{% endblock %}
|