1
|
{% extends "calebasse/base.html" %}
|
2
|
{% load url from future %}
|
3
|
|
4
|
{% block extrascripts %}
|
5
|
{{ block.super }}
|
6
|
<script src="{{ STATIC_URL }}js/calebasse.datesel.js"></script>
|
7
|
<script src="{{ STATIC_URL }}js/calebasse.agenda.js"></script>
|
8
|
<script>
|
9
|
$(function() {
|
10
|
$('table#actes tr').click(function() {
|
11
|
if ($(this).data('isbilled') == "False")
|
12
|
{
|
13
|
var id = $(this).data('id');
|
14
|
var delete_button = {
|
15
|
text: "Supprimer",
|
16
|
id: "delete-btn",
|
17
|
click: function () {
|
18
|
$(dialog).dialog('close');
|
19
|
generic_ajaxform_dialog(id + '/delete', "Supprimer l'acte",
|
20
|
'#acte-dlg', '500px', 'Oui', window.location.href);
|
21
|
|
22
|
}
|
23
|
};
|
24
|
generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
|
25
|
'#acte-dlg', '700px', 'Modifier', '.', function (dialog) {});
|
26
|
} else if ($(this).data('oldbilled') == "True") {
|
27
|
generic_ajaxform_dialog($(this).data('id') + '/rebill', "Refacturer cet acte de l'ancienne facturation) ?",
|
28
|
'#acte-dlg', '700px', 'Refacturer', '.');
|
29
|
} else {
|
30
|
alert('Vous ne pouvez pas éditer un acte déjà facturé.');
|
31
|
}
|
32
|
});
|
33
|
$('.date').datepicker();
|
34
|
$('.new-act').click(function() {
|
35
|
add_dialog('#acte-dlg', $(this).data('url'), 'Nouvel acte',
|
36
|
'850px', 'Ajouter');
|
37
|
});
|
38
|
$('#search-form input[type="checkbox"]').on('change', function () {
|
39
|
$('#search-form').submit();
|
40
|
});
|
41
|
|
42
|
});
|
43
|
</script>
|
44
|
{% endblock %}
|
45
|
|
46
|
{% block header %}
|
47
|
{{ block.super }}
|
48
|
<span>Actes - {{ service_name }}</spam>
|
49
|
{% endblock %}
|
50
|
|
51
|
{% block appbar %}
|
52
|
<div id="appbar">
|
53
|
<h2>Saisie des actes</h2>
|
54
|
<a href="../..">Retourner à l'accueil</a>
|
55
|
<button class="new-act"
|
56
|
data-url="{% url 'act-new' service=service date=date %}">
|
57
|
Ajouter un acte
|
58
|
</button>
|
59
|
</div>
|
60
|
{% endblock %}
|
61
|
|
62
|
|
63
|
{% block content %}
|
64
|
<div id="sidebar">
|
65
|
<form method="get" id="search-form">
|
66
|
<div>
|
67
|
<h3>Rechercher dans les actes</h3>
|
68
|
<h4>Patient</h4>
|
69
|
{{ search_form.non_field_errors }}
|
70
|
<label>Nom: {{ search_form.last_name }}</label>
|
71
|
{{ search_form.last_name.errors }}
|
72
|
<label>Numéro de dossier: {{ search_form.patient_record_id }}</label>
|
73
|
{{ search_form.patient_record_id.errors }}
|
74
|
<label>Numéro de sécu: {{ search_form.social_security_number }}</label>
|
75
|
{{ search_form.social_security_number.errors }}
|
76
|
<button>Rechercher</button>
|
77
|
<h4>Intervenant</h4>
|
78
|
<label>Nom: {{ search_form.doctor_name }}</label>
|
79
|
{{ search_form.doctor_name.errors }}
|
80
|
<button>Rechercher</button>
|
81
|
</div>
|
82
|
<div id="filtre">
|
83
|
<h3>Filtrer les actes</h3>
|
84
|
{{ search_form.filters }}
|
85
|
</div>
|
86
|
</form>
|
87
|
</div>
|
88
|
|
89
|
<div class="content">
|
90
|
{% include 'calebasse/datesel.html' %}
|
91
|
<br/>
|
92
|
|
93
|
<table id="actes" class="main">
|
94
|
<thead>
|
95
|
<tr>
|
96
|
<th>Dossier</th>
|
97
|
<th>État</th>
|
98
|
<th>Type d'acte</th>
|
99
|
<th>Facturé</th>
|
100
|
<th>Facturable</th>
|
101
|
<th>Perdu</th>
|
102
|
<th>Pause</th>
|
103
|
<th>Intervenants</th>
|
104
|
<th>Heure</th>
|
105
|
<th>Durée</th>
|
106
|
</tr>
|
107
|
</thead>
|
108
|
<tbody>
|
109
|
{% for act in object_list %}
|
110
|
<tr data-id="{{ act.id }}" data-isbilled="{{ act.is_billed }}"
|
111
|
{% if not act.is_billed %}class="non-factu"{% else %}{% if not act.invoice_set.all.0.number %}data-oldbilled="True"{% endif %}{% endif %}>
|
112
|
<td>{{ act.patient.paper_id|default_if_none:'' }} <span class="lightgray">({{ act.patient.id }})</span>
|
113
|
{{ act.patient.first_name }}
|
114
|
<span class="lastname">{{ act.patient.last_name }}</span>
|
115
|
</td>
|
116
|
<td>{{ act.get_state }}</td>
|
117
|
<td>{{ act.act_type }}</td>
|
118
|
<td>{% if act.is_billed %}{% if act.invoice_set.all %}{{ act.invoice_set.all.0.number }}{% else %}Ancienne facturation{% endif %}{% endif %}</td>
|
119
|
<td>{{ act.is_billable|yesno:"Oui,Non," }}{% if act.switch_billable %} (I){% endif %}</td>
|
120
|
<td>{{ act.is_lost|yesno:"Oui,Non," }}</td>
|
121
|
<td>{{ act.pause|yesno:"Oui,Non," }}</td>
|
122
|
<td>
|
123
|
{% for doctor in act.doctors.all %}
|
124
|
{{ doctor }}
|
125
|
{% if not forloop.last %}
|
126
|
<br/>
|
127
|
{% endif %}
|
128
|
{% endfor %}
|
129
|
</td>
|
130
|
<td>{{ act.time|date:"H:i" }}</td>
|
131
|
<td>{{ act.duration }}</td>
|
132
|
</tr>
|
133
|
{% endfor %}
|
134
|
</tbody>
|
135
|
</table>
|
136
|
</div>
|
137
|
{% endblock %}
|
138
|
|
139
|
{% block dialogs %}
|
140
|
|
141
|
<div id="acte-dlg" style="display: none;"></div>
|
142
|
{% endblock %}
|