Revision 54318d2c
Added by Serghei Mihai almost 9 years ago
calebasse/dossiers/forms.py | ||
---|---|---|
398 | 398 |
date_actes_start = forms.DateField(label=u'Date', localize=True) |
399 | 399 |
date_actes_end = forms.DateField(label=u'Date', localize=True) |
400 | 400 |
without_quotations = forms.BooleanField() |
401 |
|
|
402 |
class PatientRecordPrintForm(Form): |
|
403 |
|
|
404 |
prev_appointment_start_date = forms.DateField(label=u'De', required=False) |
|
405 |
prev_appointment_end_date = forms.DateField(label=u'au', required=False) |
|
406 |
next_appointment_start_date = forms.DateField(label=u'De', required=False) |
|
407 |
next_appointment_end_date = forms.DateField(label=u'au', required=False) |
calebasse/dossiers/templates/dossiers/patientrecord_tab.html | ||
---|---|---|
1 |
{% block print-button %} |
|
2 |
<button class="icon-print right print">Imprimer</button> |
|
3 |
{% endblock %} |
|
4 |
{% block content %} |
|
5 |
{% endblock %} |
|
6 |
<br style="clear:both"/> |
|
7 |
<script type="text/javascript"> |
|
8 |
init_datepickers(); |
|
9 |
$('button.print').on('click', function(event) { |
|
10 |
{% block print-actions %}{% endblock %} |
|
11 |
print_cleanup(); |
|
12 |
window.print(); |
|
13 |
}); |
|
14 |
</script> |
calebasse/dossiers/templates/dossiers/patientrecord_tab1_general.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
2 |
{% block content %} |
|
1 | 3 |
<form method="post" action="tab1" id="general-form" class="patientrecordform">{% csrf_token %} |
2 | 4 |
<div class="left"> |
3 | 5 |
<ul> |
... | ... | |
84 | 86 |
{% for state in status %} |
85 | 87 |
<button type="button" id="{{ state.0 }}">{{ state.1 }}</button> |
86 | 88 |
{% endfor %} |
87 |
<button type="button" id="patientrecord-history">Historique</button><br/>
|
|
89 |
<button type="button" id="patientrecord-history">Historique</button> |
|
88 | 90 |
<hr/> |
89 | 91 |
<p id="confidential-msg" style="display: none; font-size: 10px;">Confidentialité mise à jour</p> |
90 | 92 |
{{ form.confidential.label_tag }} : {{ form.confidential }} |
... | ... | |
113 | 115 |
<button>Créer répertoire patient</button> |
114 | 116 |
</form> |
115 | 117 |
</div> |
116 |
<br style="clear:both"/> |
|
118 |
{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_tab2_fiche_adm.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
1 | 2 |
{% load dossiers %} |
3 |
{% block content %} |
|
2 | 4 |
<div id="tabs-2"> |
3 | 5 |
<form method="post" action="tab2" id="administrative-form" class="patientrecordform">{% csrf_token %} |
4 | 6 |
<p><button class="save enable-on-change">Enregistrer</button></p> |
... | ... | |
164 | 166 |
{% endfor %} |
165 | 167 |
</div> |
166 | 168 |
</div> |
169 |
{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_tab3_adresses.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
1 | 2 |
{% load dossiers %} |
3 |
{% block content %} |
|
2 | 4 |
<div id="tabs-3"> |
3 | 5 |
<form method="post" action="tab3" id="policyholder-form" class="patientrecordform">{% csrf_token %} |
4 | 6 |
<p> |
... | ... | |
97 | 99 |
{% endfor %} |
98 | 100 |
</form> |
99 | 101 |
</div> |
102 |
{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_tab4_notifs.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
2 |
{% block content %} |
|
1 | 3 |
<div id="tabs-4"> |
2 | 4 |
{% if object.service.slug == "cmpp" %} |
3 | 5 |
<div class="notifs"> |
... | ... | |
215 | 217 |
{% endif %} |
216 | 218 |
{% endif %} |
217 | 219 |
</div> |
220 |
{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_tab5_actes_passes.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
2 |
{% block print-button %} |
|
3 |
<div class="print-container screen-only"> |
|
4 |
<form class="datepicker filter"> |
|
5 |
<h5>Filtrer par date</h5> |
|
6 |
du <input type="text" name="from" /> |
|
7 |
au <input type="text" name="to" /> |
|
8 |
</form> |
|
9 |
{{ block.super }} |
|
10 |
</div> |
|
11 |
<br class="clear" /> |
|
12 |
{% endblock %} |
|
13 |
|
|
14 |
{% block content %} |
|
1 | 15 |
<div id="tabs-5"> |
2 | 16 |
{% for state, last_rdvs in history %} |
3 | 17 |
<div class="frame"> |
... | ... | |
10 | 24 |
<tbody> |
11 | 25 |
{% for act, state, missing_workers in last_rdvs %} |
12 | 26 |
<tr> |
13 |
<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> |
|
27 |
<td><span class="date">{{ act.date|date:"SHORT_DATE_FORMAT" }}</span> |
|
28 |
<span class="time">{{ act.time|date:"H:i" }}</span>{% if missing_workers %} <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>{% endif %}</td> |
|
14 | 29 |
<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> |
15 | 30 |
<td>{{ act.act_type }}</td> |
16 | 31 |
<td class="width-limited">{% for doctor in act.doctors.all %} |
... | ... | |
27 | 42 |
</div> |
28 | 43 |
{% endfor %} |
29 | 44 |
</div> |
45 |
{% endblock %} |
|
46 |
{% block print-actions %}filter_date_bounds('#ui-tabs-5', '.frame td span.date');{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_tab6_next_rdv.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
2 |
{% block print-button %} |
|
3 |
<div class="print-container screen-only"> |
|
4 |
<form class="datepicker filter"> |
|
5 |
<h5>Filtrer par date</h5> |
|
6 |
du <input type="text" name="from" /> |
|
7 |
au <input type="text" name="to" /> |
|
8 |
</form> |
|
9 |
{{ block.super }} |
|
10 |
</div> |
|
11 |
<br class="clear" /> |
|
12 |
{% endblock %} |
|
13 |
{% block content %} |
|
1 | 14 |
<div id="tabs-6"> |
2 | 15 |
<table class="basic"> |
3 | 16 |
<thead> |
... | ... | |
6 | 19 |
<tbody> |
7 | 20 |
{% for event, state, missing_participants, inactive_participants in next_rdvs %} |
8 | 21 |
<tr> |
9 |
<td>{% firstof event.start_datetime|date:"l d/m/y H:i"|title %}{% if missing_participants or inactive_participants %} <span title="Au moins un intervenant est absent ou ne fait plus partie du service" class="icon-warning-sign absent"></span>{% endif %}</td> |
|
22 |
<td><span class="date">{{ event.start_datetime|date:"SHORT_DATE_FORMAT" }}</span> |
|
23 |
<span class="time">{% firstof event.start_datetime|date:"H:i"|title %}</span>{% if missing_participants or inactive_participants %} <span title="Au moins un intervenant est absent ou ne fait plus partie du service" class="icon-warning-sign absent"></span>{% endif %}</td> |
|
10 | 24 |
<td>{% if state %}{% if state.state_name != 'VALIDE' %}<strong>{% endif %}{{ state }}{% if state.state_name != 'VALIDE' %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td> |
11 | 25 |
<td>{{ event.act_type }}</td> |
12 | 26 |
<td class="width-limited">{% for participant in event.participants.all %} |
... | ... | |
32 | 46 |
</tbody> |
33 | 47 |
</table> |
34 | 48 |
</div> |
49 |
{% endblock %} |
|
50 |
{% block print-actions %}filter_date_bounds('#ui-tabs-6', '.basic td span.date');{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_tab7_socialisation.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
2 |
|
|
3 |
{% block content %} |
|
4 |
<br class="clear" /> |
|
1 | 5 |
<div id="tabs-7"> |
2 | 6 |
<div class="frame"> |
3 | 7 |
<h3>Périodes de socialisation</h3> |
... | ... | |
68 | 72 |
{% endfor %} |
69 | 73 |
</div> |
70 | 74 |
</div> |
75 |
{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_tab8_medical.html | ||
---|---|---|
1 |
{% extends 'dossiers/patientrecord_tab.html' %} |
|
2 |
|
|
3 |
{% block content %} |
|
1 | 4 |
<div id="tabs-8"> |
2 | 5 |
<form method="post" action="tab8" id="physiology-form" class="patientrecordform"> |
3 | 6 |
{% csrf_token %} |
... | ... | |
16 | 19 |
<button class="save enable-on-change">Enregistrer</button> |
17 | 20 |
</form> |
18 | 21 |
</div> |
22 |
{% endblock %} |
calebasse/dossiers/templates/dossiers/patientrecord_update.html | ||
---|---|---|
1 | 1 |
{% extends "dossiers/base.html" %} |
2 |
{% load i18n %} |
|
2 | 3 |
{% load url from future %} |
3 | 4 |
{% load dossiers %} |
4 | 5 |
{% block extrastyles %} |
calebasse/static/css/agenda.css | ||
---|---|---|
1 |
br.clear { |
|
2 |
clear: both; |
|
3 |
} |
|
4 |
|
|
5 | 1 |
td#dispos { |
6 | 2 |
vertical-align: top; |
7 | 3 |
} |
calebasse/static/css/dossiers.css | ||
---|---|---|
126 | 126 |
|
127 | 127 |
input[type=checkbox] + button { |
128 | 128 |
display: none; |
129 |
} |
|
129 |
} |
|
130 |
|
|
131 |
.patientrecord_print ul { |
|
132 |
margin: 0; |
|
133 |
padding: 0; |
|
134 |
} |
|
135 |
|
|
136 |
.patientrecord_print li { |
|
137 |
list-style-type: none; |
|
138 |
display: inline; |
|
139 |
} |
|
140 |
|
|
141 |
.patientrecord_print label { |
|
142 |
margin: 0 .5em; |
|
143 |
} |
|
144 |
|
|
145 |
.print-container { |
|
146 |
float: right; |
|
147 |
} |
|
148 |
.print-container h5 { |
|
149 |
margin: 0; |
|
150 |
} |
|
151 |
|
|
152 |
.print-container form { |
|
153 |
display: inline; |
|
154 |
} |
calebasse/static/css/print.css | ||
---|---|---|
7 | 7 |
color: black; |
8 | 8 |
} |
9 | 9 |
|
10 |
button { |
|
11 |
display: none; |
|
12 |
} |
|
13 |
|
|
10 | 14 |
div#header, div#splash, div#footer, div#appbar, div#datesel, |
11 |
div#djDebugToolbarHandle, button#uncheck-all, button#check-all, input.printable {
|
|
15 |
div#djDebugToolbarHandle, input.printable {
|
|
12 | 16 |
display: none; |
13 | 17 |
} |
14 | 18 |
|
... | ... | |
100 | 104 |
table.main td, table.main th { |
101 | 105 |
border: 1px solid #555; |
102 | 106 |
padding: 0 .5em; |
107 |
} |
|
108 |
|
|
109 |
|
|
110 |
/* Patient record printing */ |
|
111 |
|
|
112 |
textarea, input[type=text], select { |
|
113 |
border: 0; |
|
114 |
} |
|
115 |
|
|
116 |
textarea[value=''] { |
|
117 |
display: none; |
|
118 |
} |
|
119 |
|
|
120 |
input[value=''] { |
|
121 |
display: none; |
|
122 |
} |
|
123 |
|
|
124 |
#tabs > ul { |
|
125 |
display: none; |
|
126 |
} |
|
127 |
|
|
128 |
.social-security-contact ul { |
|
129 |
display: block; |
|
130 |
} |
|
131 |
|
|
132 |
/* tabs-7 */ |
|
133 |
|
|
134 |
#tabs-7 .subframe { |
|
135 |
padding: 0 .5em; |
|
136 |
} |
|
137 |
|
|
138 |
/* tabs-8 */ |
|
139 |
|
|
140 |
#tabs-8 label { |
|
141 |
display: inline; |
|
142 |
} |
|
143 |
|
|
144 |
.select2-results { |
|
145 |
display: none; |
|
146 |
} |
|
147 |
|
|
148 |
.select2-choices { |
|
149 |
list-style-type:none; |
|
150 |
} |
|
151 |
|
|
152 |
.select2-container + select { |
|
153 |
display: none; |
|
154 |
} |
|
155 |
|
|
156 |
#tabs-8 label:after { |
|
157 |
content: ':'; |
|
103 | 158 |
} |
calebasse/static/css/style.css | ||
---|---|---|
1407 | 1407 |
display: none; |
1408 | 1408 |
} |
1409 | 1409 |
|
1410 |
.right { |
|
1411 |
float: right; |
|
1412 |
} |
|
1413 |
|
|
1414 |
.clear { |
|
1415 |
clear: both; |
|
1416 |
} |
calebasse/static/js/calebasse.agenda.js | ||
---|---|---|
4 | 4 |
var current_date = path[3]; |
5 | 5 |
COOKIE_PATH = '/' + service + '/agenda'; |
6 | 6 |
|
7 |
function delete_prompt(text) { |
|
8 |
var r = prompt(text + '\n Pour cela veuillez entrer DEL'); |
|
9 |
if (r.toLowerCase().replace(/^\s+|\s+$/g, '') == 'del') { |
|
10 |
return true; |
|
11 |
} else { |
|
12 |
return false; |
|
13 |
} |
|
14 |
} |
|
15 |
|
|
16 | 7 |
function get_initial_fields(button, base) { |
17 | 8 |
var participants = new Array(); |
18 | 9 |
var ressource = null; |
... | ... | |
250 | 241 |
return $(ressource_target).find('a.tab'); |
251 | 242 |
} |
252 | 243 |
|
253 |
function init_datepickers(dialog) { |
|
254 |
$('.datepicker-date', dialog).datepicker({dateFormat: 'd/m/yy', showOn: 'button'}); |
|
255 |
$('.datepicker input', dialog).datepicker({dateFormat: 'd/m/yy', showOn: 'button'}); |
|
256 |
} |
|
257 |
|
|
258 | 244 |
function event_dialog(url, title, width, btn_text) { |
259 | 245 |
function add_periodic_events(base) { |
260 | 246 |
init_datepickers(base); |
calebasse/static/js/calebasse.dossiers.js | ||
---|---|---|
10 | 10 |
$('input#id_prolongation_date', that).datepicker({dateFormat: 'd/m/yy', showOn: 'button' }); |
11 | 11 |
} |
12 | 12 |
|
13 |
function print_cleanup() { |
|
14 |
$.each($('textarea'), function() { |
|
15 |
if(!$(this).val()) |
|
16 |
$(this).addClass('screen-only'); |
|
17 |
else |
|
18 |
$(this).removeClass('screen-only'); |
|
19 |
}); |
|
20 |
} |
|
21 |
|
|
22 |
function filter_date_bounds(tab, selector) { |
|
23 |
console.log(tab); |
|
24 |
var from = $(tab + ' form.filter input[name=from]').datepicker('getDate'); |
|
25 |
var to = $(tab + ' form.filter input[name=to]').datepicker('getDate'); |
|
26 |
if (to) { |
|
27 |
to.setHours(23); to.setMinutes(59); to.setSeconds(59); |
|
28 |
} |
|
29 |
$.each($(tab + ' ' + selector), function(){ |
|
30 |
var current = $.datepicker.parseDate('d/m/yy', $(this).text()); |
|
31 |
if (current < from || (to && current >= to)) { |
|
32 |
$(this).parent().parent().addClass('screen-only'); |
|
33 |
} else { |
|
34 |
$(this).parent().parent().removeClass('screen-only'); |
|
35 |
} |
|
36 |
}); |
|
37 |
} |
|
38 |
|
|
13 | 39 |
function load_add_address_dialog() { |
14 | 40 |
var str = $("#contactform").serialize(); |
15 | 41 |
$.cookie('contactform', str, { path: window.location.pathname }); |
... | ... | |
391 | 417 |
}); |
392 | 418 |
}); |
393 | 419 |
|
420 |
$('#patientrecord-print-button').on('click', function(event) { |
|
421 |
event.preventDefault(); |
|
422 |
generic_ajaxform_dialog($(this).attr('href'), 'Impression dossier patient', |
|
423 |
'#ajax-dlg', '450px', 'Imprimer', false, false); |
|
424 |
}); |
|
425 |
|
|
394 | 426 |
$('#new-patientrecord').click(function() { |
395 | 427 |
generic_ajaxform_dialog('new', 'Nouveau dossier', |
396 | 428 |
'#dossier-dlg', '700px', 'Ajouter', false, function(that) { |
calebasse/static/js/common.js | ||
---|---|---|
1 |
function delete_prompt(text) { |
|
2 |
var r = prompt(text + '\n Pour cela veuillez entrer DEL'); |
|
3 |
if (r.toLowerCase().replace(/^\s+|\s+$/g, '') == 'del') { |
|
4 |
return true; |
|
5 |
} else { |
|
6 |
return false; |
|
7 |
} |
|
8 |
} |
|
9 |
|
|
10 |
function init_datepickers(on) { |
|
11 |
$('.datepicker-date', on).datepicker({dateFormat: 'd/m/yy', showOn: 'button'}); |
|
12 |
$('.datepicker input', on).datepicker({dateFormat: 'd/m/yy', showOn: 'button'}); |
|
13 |
} |
calebasse/templates/calebasse/base.html | ||
---|---|---|
20 | 20 |
<script src="{{ STATIC_URL }}js/jquery.form.js"></script> |
21 | 21 |
<script src="{{ STATIC_URL }}js/jquery.sortElements.js"></script> |
22 | 22 |
<script src="{{ STATIC_URL }}development-bundle/ui/i18n/jquery.ui.datepicker-fr.js"></script> |
23 |
<script src="{{ STATIC_URL }}js/common.js"></script> |
|
23 | 24 |
<script src="{{ STATIC_URL }}js/ajax_select.js"></script> |
24 | 25 |
<script src="{{ STATIC_URL }}js/jquery.mousewheel.js"></script> |
25 | 26 |
<script src="{{ STATIC_URL }}js/calebasse.mousewheel.js"></script> |
Also available in: Unified diff
dossiers: printing each patient record tab with filtering past and future appointments by dates
Closes #3109