{% extends 'hospital/base.html' %} {% load static %} {% load i18n %} {% block sidebar.users %} class="active" {% endblock %} {% block content %}

{% trans "Patient Details" %}

{% trans "Profile Information" %}

{% trans "Name" %}: {{ patient.profile.first_name }} {{ patient.profile.last_name }}
{% trans "Phone Number" %}: {{ patient.phone_number }}
{% trans "Email" %}: {% if patient.profile.email %} {{ patient.profile.email }} {% else %} {% trans "Not provided" %} {% endif %}
{% trans "Age" %}: {{ patient.profile.age }} {% trans "years" %}
{% trans "Gender" %}: {% if patient.profile.gender %} {% trans "Female" %} {% else %} {% trans "Male" %} {% endif %}
{% trans "Hospital Code" %}: {{ patient.profile.hospital_code }}
{% trans "Registration Date" %}: {{ patient.created_at|date:"Y-m-d" }}
{% trans "Status" %}: {% if patient.isRegistered %} {% trans "Registered" %} {% else %} {% trans "Pending" %} {% endif %}
{% trans "Assigned Doctor" %}: {% if patient.profile.therapist %} {{ patient.profile.therapist.first_name }} {{ patient.profile.therapist.last_name }} {% else %} {% trans "Not Assigned" %} {% endif %}
{% trans "Weight" %}: {% if patient.profile.weight %} {{ patient.profile.weight }} {% trans "kg" %} {% else %} {% trans "Not recorded" %} {% endif %}
{% trans "Height" %}: {% if patient.profile.height %} {{ patient.profile.height }} {% trans "cm" %} {% else %} {% trans "Not recorded" %} {% endif %}
{% trans "BMI" %}: {% if bmi %} {{ bmi }} {% if bmi < 18.5 %} {% trans "Underweight" %} {% elif bmi < 25 %} {% trans "Normal" %} {% elif bmi < 30 %} {% trans "Overweight" %} {% else %} {% trans "Obese" %} {% endif %} {% else %} {% trans "Not available" %} {% endif %}
{% if active_upgrade %}

{% trans "Active Subscription" %}

{% trans "Plan" %}

{{ active_upgrade.upgrade_type }}

{% trans "Duration" %}

{{ active_upgrade.upgrade_time }} {% trans "days" %}

{% trans "Days Remaining" %}

{{ active_upgrade.days_remaining }}

{% trans "Upgrade Date" %}

{{ active_upgrade.upgrade_date|date:"Y-m-d" }}


{% widthratio active_upgrade.days_remaining active_upgrade.upgrade_time 100 as progress_percent %}
{{ active_upgrade.days_remaining }} / {{ active_upgrade.upgrade_time }} {% trans "days" %}
{% else %}
{% trans "This patient does not have an active subscription" %}
{% endif %}

{% trans "Subscription History" %}

{% if upgrades %}
{% for upgrade in upgrades %} {% endfor %}
# {% trans "Type" %} {% trans "Duration" %} {% trans "Upgrade Date" %} {% trans "Days Remaining" %} {% trans "Status" %}
{{ forloop.counter }} {{ upgrade.upgrade_type }} {{ upgrade.upgrade_time }} {% trans "days" %} {{ upgrade.upgrade_date|date:"Y-m-d" }} {% if upgrade.days_remaining > 0 %} {{ upgrade.days_remaining }} {% trans "days" %} {% else %} {% trans "Expired" %} {% endif %} {% if upgrade.days_remaining > 0 %} {% trans "Active" %} {% else %} {% trans "Expired" %} {% endif %}
{% else %}
{% trans "No subscription history found for this patient" %}
{% endif %}
{% endblock %}