201 lines
10 KiB
HTML
201 lines
10 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}Appointment Details - {{ block.super }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid">
|
|
<div class="row mb-3">
|
|
<div class="col">
|
|
<h1>Appointment Details</h1>
|
|
<p class="text-muted">{{ appointment.scheduled_datetime|date:"M d, Y H:i" }} • {{ appointment.get_status_display }}</p>
|
|
</div>
|
|
<div class="col-auto">
|
|
<div class="btn-group">
|
|
{% if appointment.status == 'PENDING' %}
|
|
<button class="btn btn-success"
|
|
hx-post="{% url 'appointments:check_in_patient' appointment.id %}"
|
|
hx-confirm="Check in this patient?"
|
|
hx-swap="none">
|
|
<i class="fas fa-check me-1"></i>Check In
|
|
</button>
|
|
{% endif %}
|
|
<button class="btn btn-outline-primary">
|
|
<i class="fas fa-edit me-1"></i>Edit
|
|
</button>
|
|
<button class="btn btn-outline-secondary">
|
|
<i class="fas fa-print me-1"></i>Print
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<!-- Appointment Information -->
|
|
<div class="col-lg-6">
|
|
<div class="card mb-3">
|
|
<div class="card-header">
|
|
<h5 class="mb-0"><i class="fas fa-calendar me-2"></i>Appointment Information</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-sm">
|
|
<tr><td>Date & Time</td><td>{{ appointment.scheduled_datetime|date:"M d, Y H:i" }}</td></tr>
|
|
<tr><td>Duration</td><td>{{ appointment.duration_minutes }} minutes</td></tr>
|
|
<tr><td>Type</td><td>{{ appointment.get_appointment_type_display }}</td></tr>
|
|
<tr><td>Specialty</td><td>{{ appointment.specialty|default:"General" }}</td></tr>
|
|
<tr><td>Priority</td><td>{{ appointment.get_priority_display }}</td></tr>
|
|
<tr><td>Status</td><td>
|
|
{% if appointment.status == 'PENDING' %}
|
|
<span class="badge bg-warning">{{ appointment.get_status_display }}</span>
|
|
{% elif appointment.status == 'CONFIRMED' %}
|
|
<span class="badge bg-info">{{ appointment.get_status_display }}</span>
|
|
{% elif appointment.status == 'CHECKED_IN' %}
|
|
<span class="badge bg-primary">{{ appointment.get_status_display }}</span>
|
|
{% elif appointment.status == 'IN_PROGRESS' %}
|
|
<span class="badge bg-success">{{ appointment.get_status_display }}</span>
|
|
{% elif appointment.status == 'COMPLETED' %}
|
|
<span class="badge bg-success">{{ appointment.get_status_display }}</span>
|
|
{% elif appointment.status == 'CANCELLED' %}
|
|
<span class="badge bg-danger">{{ appointment.get_status_display }}</span>
|
|
{% elif appointment.status == 'NO_SHOW' %}
|
|
<span class="badge bg-secondary">{{ appointment.get_status_display }}</span>
|
|
{% endif %}
|
|
</td></tr>
|
|
{% if appointment.is_telemedicine %}
|
|
<tr><td>Telemedicine</td><td><span class="badge bg-info">Yes</span></td></tr>
|
|
{% endif %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% if appointment.chief_complaint %}
|
|
<div class="card mb-3">
|
|
<div class="card-header">
|
|
<h5 class="mb-0"><i class="fas fa-stethoscope me-2"></i>Chief Complaint</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<p>{{ appointment.chief_complaint }}</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if appointment.notes %}
|
|
<div class="card mb-3">
|
|
<div class="card-header">
|
|
<h5 class="mb-0"><i class="fas fa-sticky-note me-2"></i>Notes</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<p>{{ appointment.notes|linebreaks }}</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<!-- Patient & Provider Information -->
|
|
<div class="col-lg-6">
|
|
<div class="card mb-3">
|
|
<div class="card-header">
|
|
<h5 class="mb-0"><i class="fas fa-user me-2"></i>Patient Information</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-sm">
|
|
<tr><td>Name</td><td><strong>{{ appointment.patient.get_full_name }}</strong></td></tr>
|
|
<tr><td>MRN</td><td>{{ appointment.patient.mrn }}</td></tr>
|
|
<tr><td>Date of Birth</td><td>{{ appointment.patient.date_of_birth|date:"M d, Y" }}</td></tr>
|
|
<tr><td>Age</td><td>{{ appointment.patient.age }}</td></tr>
|
|
<tr><td>Gender</td><td>{{ appointment.patient.get_gender_display }}</td></tr>
|
|
<tr><td>Phone</td><td>{{ appointment.patient.phone_number|default:"Not provided" }}</td></tr>
|
|
<tr><td>Email</td><td>{{ appointment.patient.email|default:"Not provided" }}</td></tr>
|
|
</table>
|
|
<div class="mt-2">
|
|
<a href="{% url 'patients:patient_detail' appointment.patient.id %}" class="btn btn-sm btn-outline-primary">
|
|
<i class="fas fa-eye me-1"></i>View Patient
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if appointment.provider %}
|
|
<div class="card mb-3">
|
|
<div class="card-header">
|
|
<h5 class="mb-0"><i class="fas fa-user-md me-2"></i>Provider Information</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-sm">
|
|
<tr><td>Name</td><td><strong>{{ appointment.provider.get_full_name }}</strong></td></tr>
|
|
<tr><td>Role</td><td>{{ appointment.provider.get_role_display }}</td></tr>
|
|
<tr><td>Department</td><td>{{ appointment.provider.department|default:"Not specified" }}</td></tr>
|
|
<tr><td>Phone</td><td>{{ appointment.provider.phone_number|default:"Not provided" }}</td></tr>
|
|
<tr><td>Email</td><td>{{ appointment.provider.email|default:"Not provided" }}</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Appointment Timeline -->
|
|
<div class="card mb-3">
|
|
<div class="card-header">
|
|
<h5 class="mb-0"><i class="fas fa-clock me-2"></i>Timeline</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="timeline">
|
|
<div class="timeline-item">
|
|
<strong>Created:</strong> {{ appointment.created_at|date:"M d, Y H:i" }}
|
|
{% if appointment.created_by %}
|
|
<br><small class="text-muted">by {{ appointment.created_by.get_full_name }}</small>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if appointment.confirmed_at %}
|
|
<div class="timeline-item">
|
|
<strong>Confirmed:</strong> {{ appointment.confirmed_at|date:"M d, Y H:i" }}
|
|
{% if appointment.confirmed_by %}
|
|
<br><small class="text-muted">by {{ appointment.confirmed_by.get_full_name }}</small>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if appointment.checked_in_at %}
|
|
<div class="timeline-item">
|
|
<strong>Checked In:</strong> {{ appointment.checked_in_at|date:"M d, Y H:i" }}
|
|
{% if appointment.checked_in_by %}
|
|
<br><small class="text-muted">by {{ appointment.checked_in_by.get_full_name }}</small>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if appointment.started_at %}
|
|
<div class="timeline-item">
|
|
<strong>Started:</strong> {{ appointment.started_at|date:"M d, Y H:i" }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if appointment.completed_at %}
|
|
<div class="timeline-item">
|
|
<strong>Completed:</strong> {{ appointment.completed_at|date:"M d, Y H:i" }}
|
|
{% if appointment.completed_by %}
|
|
<br><small class="text-muted">by {{ appointment.completed_by.get_full_name }}</small>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if appointment.cancelled_at %}
|
|
<div class="timeline-item">
|
|
<strong>Cancelled:</strong> {{ appointment.cancelled_at|date:"M d, Y H:i" }}
|
|
{% if appointment.cancelled_by %}
|
|
<br><small class="text-muted">by {{ appointment.cancelled_by.get_full_name }}</small>
|
|
{% endif %}
|
|
{% if appointment.cancellation_reason %}
|
|
<br><small class="text-muted">Reason: {{ appointment.cancellation_reason }}</small>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|