178 lines
9.9 KiB
HTML
178 lines
9.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}Telemedicine Sessions - {{ 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-video me-2"></i>Telemedicine Sessions
|
|
</h4>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<!-- Filters -->
|
|
<div class="row mb-3">
|
|
<div class="col-md-3">
|
|
<select name="status" class="form-select">
|
|
<option value="">All Status</option>
|
|
<option value="SCHEDULED">Scheduled</option>
|
|
<option value="WAITING">Waiting</option>
|
|
<option value="IN_PROGRESS">In Progress</option>
|
|
<option value="COMPLETED">Completed</option>
|
|
<option value="CANCELLED">Cancelled</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<select name="platform" class="form-select">
|
|
<option value="">All Platforms</option>
|
|
<option value="ZOOM">Zoom</option>
|
|
<option value="TEAMS">Microsoft Teams</option>
|
|
<option value="WEBEX">WebEx</option>
|
|
<option value="CUSTOM">Custom Platform</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<input type="text" name="search" class="form-control" placeholder="Search patients or providers...">
|
|
</div>
|
|
<div class="col-md-2">
|
|
<button type="submit" class="btn btn-primary w-100">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Sessions List -->
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Patient</th>
|
|
<th>Provider</th>
|
|
<th>Scheduled Time</th>
|
|
<th>Platform</th>
|
|
<th>Status</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for session in sessions %}
|
|
<tr>
|
|
<td>
|
|
<strong>{{ session.appointment.patient.get_full_name }}</strong><br>
|
|
<small class="text-muted">MRN: {{ session.appointment.patient.mrn }}</small>
|
|
</td>
|
|
<td>
|
|
<strong>{{ session.appointment.provider.get_full_name }}</strong><br>
|
|
<small class="text-muted">{{ session.appointment.provider.get_role_display }}</small>
|
|
</td>
|
|
<td>{{ session.scheduled_start|date:"M d, Y H:i" }}</td>
|
|
<td>
|
|
<span class="badge bg-info">{{ session.get_platform_display }}</span>
|
|
</td>
|
|
<td>
|
|
{% if session.status == 'SCHEDULED' %}
|
|
<span class="badge bg-warning">Scheduled</span>
|
|
{% elif session.status == 'WAITING' %}
|
|
<span class="badge bg-info">Waiting</span>
|
|
{% elif session.status == 'IN_PROGRESS' %}
|
|
<span class="badge bg-success">In Progress</span>
|
|
{% elif session.status == 'COMPLETED' %}
|
|
<span class="badge bg-success">Completed</span>
|
|
{% elif session.status == 'CANCELLED' %}
|
|
<span class="badge bg-danger">Cancelled</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div class="btn-group btn-group-sm">
|
|
{% if session.status == 'SCHEDULED' or session.status == 'WAITING' %}
|
|
<button class="btn btn-outline-success"
|
|
title="Start Session"
|
|
hx-post="{% url 'appointments:start_telemedicine_session' session.id %}"
|
|
hx-confirm="Start telemedicine session?"
|
|
hx-swap="none">
|
|
<i class="fas fa-play"></i>
|
|
</button>
|
|
{% endif %}
|
|
|
|
{% if session.meeting_url %}
|
|
<a href="{{ session.meeting_url }}"
|
|
target="_blank"
|
|
class="btn btn-outline-primary"
|
|
title="Join Meeting">
|
|
<i class="fas fa-video"></i>
|
|
</a>
|
|
{% endif %}
|
|
|
|
<button class="btn btn-outline-info"
|
|
title="View Details">
|
|
<i class="fas fa-eye"></i>
|
|
</button>
|
|
|
|
{% if session.status not in 'COMPLETED,CANCELLED' %}
|
|
<button class="btn btn-outline-danger"
|
|
title="Cancel Session"
|
|
hx-post="{% url 'appointments:cancel_telemedicine_session' session.id %}"
|
|
hx-confirm="Cancel this telemedicine session?"
|
|
hx-swap="none">
|
|
<i class="fas fa-times"></i>
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="6" class="text-center py-4">
|
|
<i class="fas fa-video fa-3x text-muted mb-3"></i>
|
|
<h5 class="text-muted">No telemedicine sessions found</h5>
|
|
<p class="text-muted">No sessions match your current filters.</p>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Pagination -->
|
|
{% if is_paginated %}
|
|
<nav aria-label="Telemedicine sessions 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 %}
|
|
|