188 lines
10 KiB
HTML
188 lines
10 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}Vital Signs - {{ block.super }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="card-title mb-0">
|
|
<i class="fas fa-heartbeat me-2"></i>Vital Signs Management
|
|
</h4>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<!-- Filters -->
|
|
<div class="row mb-3">
|
|
<div class="col-md-2">
|
|
<input type="date" name="date_from" class="form-control" placeholder="From Date">
|
|
</div>
|
|
<div class="col-md-2">
|
|
<input type="date" name="date_to" class="form-control" placeholder="To Date">
|
|
</div>
|
|
<div class="col-md-2">
|
|
<select name="critical_only" class="form-select">
|
|
<option value="">All Values</option>
|
|
<option value="true">Critical Only</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<input type="text" name="search" class="form-control" placeholder="Search patients, MRN...">
|
|
</div>
|
|
<div class="col-md-2">
|
|
<button type="submit" class="btn btn-primary w-100">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Vital Signs Table -->
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Patient</th>
|
|
<th>Date/Time</th>
|
|
<th>Temperature</th>
|
|
<th>Blood Pressure</th>
|
|
<th>Heart Rate</th>
|
|
<th>Respiratory Rate</th>
|
|
<th>O2 Saturation</th>
|
|
<th>Measured By</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for vitals in vital_signs %}
|
|
<tr {% if vitals.critical_values %}class="table-warning"{% endif %}>
|
|
<td>
|
|
<strong>{{ vitals.patient.get_full_name }}</strong><br>
|
|
<small class="text-muted">
|
|
MRN: {{ vitals.patient.mrn }}
|
|
{% if vitals.encounter %}
|
|
• Encounter: {{ vitals.encounter.id }}
|
|
{% endif %}
|
|
</small>
|
|
</td>
|
|
<td>{{ vitals.measured_datetime|date:"M d, Y H:i" }}</td>
|
|
<td>
|
|
{% if vitals.temperature %}
|
|
{{ vitals.temperature }}°{{ vitals.temperature_unit }}
|
|
{% if 'temperature' in vitals.critical_values %}
|
|
<i class="fas fa-exclamation-triangle text-danger ms-1" title="Critical"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="text-muted">-</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if vitals.systolic_bp and vitals.diastolic_bp %}
|
|
{{ vitals.systolic_bp }}/{{ vitals.diastolic_bp }}
|
|
{% if 'blood_pressure' in vitals.critical_values %}
|
|
<i class="fas fa-exclamation-triangle text-danger ms-1" title="Critical"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="text-muted">-</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if vitals.heart_rate %}
|
|
{{ vitals.heart_rate }} bpm
|
|
{% if 'heart_rate' in vitals.critical_values %}
|
|
<i class="fas fa-exclamation-triangle text-danger ms-1" title="Critical"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="text-muted">-</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if vitals.respiratory_rate %}
|
|
{{ vitals.respiratory_rate }} /min
|
|
{% if 'respiratory_rate' in vitals.critical_values %}
|
|
<i class="fas fa-exclamation-triangle text-danger ms-1" title="Critical"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="text-muted">-</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if vitals.oxygen_saturation %}
|
|
{{ vitals.oxygen_saturation }}%
|
|
{% if 'oxygen_saturation' in vitals.critical_values %}
|
|
<i class="fas fa-exclamation-triangle text-danger ms-1" title="Critical"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="text-muted">-</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ vitals.measured_by.get_full_name }}</td>
|
|
<td>
|
|
<div class="btn-group btn-group-sm">
|
|
<button class="btn btn-outline-primary" title="View Details">
|
|
<i class="fas fa-eye"></i>
|
|
</button>
|
|
<button class="btn btn-outline-info" title="Chart View">
|
|
<i class="fas fa-chart-line"></i>
|
|
</button>
|
|
{% if vitals.critical_values %}
|
|
<button class="btn btn-outline-warning" title="Alert Provider">
|
|
<i class="fas fa-bell"></i>
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="9" class="text-center py-4">
|
|
<i class="fas fa-heartbeat fa-3x text-muted mb-3"></i>
|
|
<h5 class="text-muted">No vital signs found</h5>
|
|
<p class="text-muted">No vital signs match your current filters.</p>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Pagination -->
|
|
{% if is_paginated %}
|
|
<nav aria-label="Vital signs pagination">
|
|
<ul class="pagination justify-content-center">
|
|
{% if page_obj.has_previous %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page=1">First</a>
|
|
</li>
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ page_obj.previous_page_number }}">Previous</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
<li class="page-item active">
|
|
<span class="page-link">
|
|
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
|
|
</span>
|
|
</li>
|
|
|
|
{% if page_obj.has_next %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ page_obj.next_page_number }}">Next</a>
|
|
</li>
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ page_obj.paginator.num_pages }}">Last</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|