132 lines
5.7 KiB
HTML
132 lines
5.7 KiB
HTML
{% load i18n patient_tags %}
|
|
|
|
{% if consultations %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Date" %}</th>
|
|
<th>{% trans "Patient" %}</th>
|
|
<th>{% trans "Chief Complaint" %}</th>
|
|
<th>{% trans "Provider" %}</th>
|
|
<th>{% trans "Follow-ups" %}</th>
|
|
<th>{% trans "Signature" %}</th>
|
|
<th>{% trans "Actions" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for consultation in consultations %}
|
|
<tr>
|
|
<td>
|
|
<strong>{{ consultation.consultation_date|date:"Y-m-d" }}</strong>
|
|
<br>
|
|
<small class="text-muted">{{ consultation.created_at|date:"H:i" }}</small>
|
|
</td>
|
|
<td>
|
|
<a href="{% url 'core:patient_detail' consultation.patient.pk %}" class="text-decoration-none">
|
|
{% patient_name consultation.patient %}
|
|
</a>
|
|
<br>
|
|
<small class="text-muted">{% trans "MRN" %}: {{ consultation.patient.mrn }}</small>
|
|
</td>
|
|
<td>
|
|
<div class="text-truncate" style="max-width: 300px;">
|
|
{{ consultation.chief_complaint|default:"—"|truncatewords:15 }}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="small">
|
|
{{ consultation.provider.get_full_name }}
|
|
<br>
|
|
<span class="text-muted">{{ consultation.provider.get_role_display }}</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="badge bg-info">
|
|
{{ consultation.followups.count }} {% trans "follow-up(s)" %}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
{% if consultation.signed_by %}
|
|
<span class="badge bg-success" title="{% trans 'Signed by' %} {{ consultation.signed_by.get_full_name }} {% trans 'on' %} {{ consultation.signed_at|date:'Y-m-d H:i' }}">
|
|
<i class="fas fa-check-circle me-1"></i>{% trans "Signed" %}
|
|
</span>
|
|
{% else %}
|
|
<span class="badge bg-warning text-dark" title="{% trans 'Not signed' %}">
|
|
<i class="fas fa-exclamation-triangle me-1"></i>{% trans "Unsigned" %}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div class="btn-group btn-group-sm" role="group">
|
|
<a href="{% url 'medical:consultation_detail' consultation.pk %}"
|
|
class="btn btn-outline-primary"
|
|
data-bs-toggle="tooltip"
|
|
title="{% trans 'View Details' %}">
|
|
<i class="fas fa-eye"></i>
|
|
</a>
|
|
{% if user.role in 'ADMIN,DOCTOR' %}
|
|
<a href="{% url 'medical:consultation_update' consultation.pk %}"
|
|
class="btn btn-outline-secondary"
|
|
data-bs-toggle="tooltip"
|
|
title="{% trans 'Edit' %}">
|
|
<i class="fas fa-edit"></i>
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Pagination -->
|
|
{% if is_paginated %}
|
|
<nav aria-label="{% trans 'Page navigation' %}">
|
|
<ul class="pagination justify-content-center">
|
|
{% if page_obj.has_previous %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ page_obj.previous_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}">
|
|
<i class="fas fa-angle-left"></i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% for num in page_obj.paginator.page_range %}
|
|
{% if page_obj.number == num %}
|
|
<li class="page-item active"><span class="page-link">{{ num }}</span></li>
|
|
{% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ num }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}">{{ num }}</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if page_obj.has_next %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="?page={{ page_obj.next_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}">
|
|
<i class="fas fa-angle-right"></i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
<div class="text-center text-muted">
|
|
{% trans "Showing" %} {{ page_obj.start_index }} - {{ page_obj.end_index }} {% trans "of" %} {{ page_obj.paginator.count }}
|
|
</div>
|
|
</nav>
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
<div class="text-center py-5">
|
|
<i class="fas fa-stethoscope fa-3x text-muted mb-3"></i>
|
|
<h5 class="text-muted">{% trans "No medical consultations found" %}</h5>
|
|
<p class="text-muted">{% trans "Try adjusting your filters or create a new consultation" %}</p>
|
|
{% if user.role in 'ADMIN,DOCTOR' %}
|
|
<a href="{% url 'medical:consultation_create' %}" class="btn btn-primary mt-3">
|
|
<i class="fas fa-plus me-1"></i>{% trans "Create Consultation" %}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|