{% extends 'familytouch/base.html' %} {% block title %}Provider Appointments - FamilyTouch{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% if messages %}
{% for m in messages %}
{{ m }}
{% endfor %}
{% endif %}
{{ scheduled_count }}
Scheduled
{{ completed_count }}
Completed
{{ patients|length }}
Connected Patients

📅 Upcoming Appointments

{% if appointments %} {% for a in appointments %}
👤 {{ a.patient.get_full_name|default:a.patient.username }}
🕐 {{ a.start|date:"l, M d, Y @ g:i A" }} {% if a.end %} - {{ a.end|date:"g:i A" }}{% endif %}
{% if a.reason %}
📋 {{ a.reason }}
{% endif %}
{{ a.get_status_display }}
{% csrf_token %}
{% csrf_token %}
{% endfor %} {% else %}
📅

No upcoming appointments scheduled

{% endif %}

➕ Create New Appointment

{% if patients %}
{% csrf_token %}
{% else %}
👥

No connected patients found. Connect with patients first to schedule appointments.

View Patients
{% endif %}
{% if past_appointments %}

📋 Recent Past Appointments

{% for a in past_appointments %}
👤 {{ a.patient.get_full_name|default:a.patient.username }}
🕐 {{ a.start|date:"l, M d, Y @ g:i A" }}
{% if a.reason %}
📋 {{ a.reason }}
{% endif %} {{ a.get_status_display }}
{% endfor %}
{% endif %}
← Back to Dashboard
{% endblock %}