{% extends "base.html" %}{% set active="appointments" %}{% block title %}Appointments{% endblock %}{% block page_title %}Appointments{% endblock %} {% block content %} {% if msg %}
{{ msg[1] }}
{% endif %}
{% if request.args.get('patient_id') %}{% endif %} {% if status_filter %}Clear{% endif %}
{% if role in ['admin','receptionist'] %}➕ Schedule{% endif %}
{% if role != 'patient' %}{% endif %} {% if role != 'doctor' %}{% endif %} {% for a in apts %} {% if role != 'patient' %}{% endif %} {% if role != 'doctor' %}{% endif %} {% if a.diagnosis %} {% endif %} {% else %} {% endfor %}
#PatientDoctorDate & TimeServiceReasonStatusActions
#{{ a.appointment_id }}{{ a.patient_name }}{% if a.patient_phone %}
{{ a.patient_phone }}
{% endif %}
{{ a.doctor_name }}{% if a.specialization %}
{{ a.specialization }}
{% endif %}
{{ a.appointment_datetime[:10] }}
{{ a.appointment_datetime[11:16] }}
{{ a.service_name or '—' }} {{ a.reason or '—' }} {{ a.status }} {% if a.status == 'Scheduled' %}
{% if role in ['admin','receptionist'] %} {% endif %} {% if role in ['doctor','admin'] %} {% endif %} {% elif a.status == 'Completed' and a.diagnosis %} {% endif %}
📭

No appointments found.

{% if role in ['doctor','admin'] %} {% endif %} {% if role in ['admin','receptionist'] %} {% endif %} {% endblock %}