{% load static %}
{% if care_plans %}
{% for plan in care_plans %}
{{ plan.title|truncatechars:30 }}
{{ plan.get_status_display }}
{{ plan.get_plan_type_display }} {{ plan.get_priority_display }}
Progress {{ plan.completion_percentage }}%
Start: {{ plan.start_date|date:"M d, Y" }}
{% if plan.target_completion_date %} Target: {{ plan.target_completion_date|date:"M d, Y" }} {% endif %}
Provider: {{ plan.primary_provider.get_full_name }}
{% if plan.care_team.exists %}
Team: {{ plan.care_team.count }} member{{ plan.care_team.count|pluralize }}
{% endif %} {% if plan.goals %}
Goals ({{ plan.goals|length }}):
{% for goal in plan.goals|slice:":2" %}
• {{ goal.description|truncatechars:40 }}
{% endfor %} {% if plan.goals|length > 2 %}
... and {{ plan.goals|length|add:"-2" }} more
{% endif %}
{% endif %} {% if plan.next_review_date %}
Next Review: {{ plan.next_review_date|date:"M d, Y" }} {% if plan.is_overdue %}(Overdue){% endif %}
{% endif %} {% if plan.related_problems.exists %}
{{ plan.related_problems.count }} related problem{{ plan.related_problems.count|pluralize }}
{% endif %}
{% if plan.status == 'ACTIVE' %} {% endif %}
{% if plan.approved %} {% endif %} {% if plan.is_overdue %} {% endif %} {% if plan.completion_percentage == 100 %} {% endif %}
{% endfor %}
{{ care_plans|length }}
Total Plans
{{ active_plans_count }}
Active
{{ overdue_plans_count }}
Overdue
{{ avg_completion }}%
Avg Progress
Care Plan Management
Manage patient care coordination and goals
{% else %}
No Care Plans

No care plans have been created for this patient yet.
Care plans help coordinate patient care and track treatment goals.

{% endif %}