Display monitoring place on all patient alerts page.
This commit is contained in:
parent
0bc86da53e
commit
9e2ae5e86a
|
@ -340,7 +340,8 @@ class PatientsEpisodesOpened(cbv.BasicView):
|
|||
episode.end.isoformat(), json.loads(episode.definition),
|
||||
episode.duration, episode.start.date().isoformat(),
|
||||
episode.checked, episode.id,
|
||||
episode.patient.id, episode.patient.display_name)
|
||||
episode.patient.id, episode.patient.display_name,
|
||||
episode.patient.monitoring_place)
|
||||
for episode in medibot_models.Episode.objects.
|
||||
filter(opened=True, checked=False).order_by('-start')]
|
||||
return HttpResponse(json.dumps(values),
|
||||
|
@ -355,7 +356,8 @@ class PatientsEpisodesClosed(cbv.BasicView):
|
|||
episode.end.isoformat(), json.loads(episode.definition),
|
||||
episode.duration, episode.end.date().isoformat(),
|
||||
episode.checked, episode.id,
|
||||
episode.patient.id, episode.patient.display_name)
|
||||
episode.patient.id, episode.patient.display_name,
|
||||
episode.patient.monitoring_place)
|
||||
for episode in medibot_models.Episode.objects.
|
||||
filter(opened=False, checked=False, end__gt=after).order_by('-end')]
|
||||
return HttpResponse(json.dumps(values),
|
||||
|
|
|
@ -62,9 +62,10 @@ var ALERTS = ALERTS || (function(){
|
|||
start_date = alert[1],
|
||||
end_date = opened ? "" : alert[2],
|
||||
checked = alert[6],
|
||||
id = alert[7];
|
||||
patient_id = alert[8];
|
||||
id = alert[7],
|
||||
patient_id = alert[8],
|
||||
patient_display_name = alert[9],
|
||||
patient_monitoring_place = alert[10],
|
||||
/* html content in a string */
|
||||
content = '<tr class="alert-block ';
|
||||
|
||||
|
@ -85,7 +86,6 @@ var ALERTS = ALERTS || (function(){
|
|||
if ( patient_id ) {
|
||||
content += '<td>' + patient_display_name + '</td>';
|
||||
}
|
||||
content += '<td class="definition ' + level.toLowerCase() + '">' + seq_id + '</td>';
|
||||
content += '<td>';
|
||||
if ( metric == 'HR' ){
|
||||
content += '<i class="fa fa-heart"></i>';
|
||||
|
@ -113,7 +113,10 @@ var ALERTS = ALERTS || (function(){
|
|||
+ $.format.date(new Date(start_date), "HH:mm:ss")+'</span>';
|
||||
}
|
||||
content += '</td>';
|
||||
content += '<td class="duration">' + UTILS.get_display_time_s(duration) + '</td>'
|
||||
content += '<td class="duration">' + UTILS.get_display_time_s(duration) + '</td>';
|
||||
if ( patient_id ) {
|
||||
content += '<td>' + patient_monitoring_place + '</td>';
|
||||
}
|
||||
if ( checked ) {
|
||||
content += '<td class="checker checked">' + gettext('Checked') + '</td>'
|
||||
} else {
|
||||
|
@ -159,6 +162,7 @@ var ALERTS = ALERTS || (function(){
|
|||
error: function() {
|
||||
$('span#critical_alert_count').empty();
|
||||
$('span#dangerous_alert_count').empty();
|
||||
UTILS.show_message(gettext("Database offline."));
|
||||
}
|
||||
});
|
||||
_refresh_alerts_stats_to = setTimeout(function(){
|
||||
|
|
Reference in New Issue