{% extends 'layouts/base.html' %} {% load i18n %} {% load static %} {% block title %}{{ patient.get_full_name }} - {% trans "Patient Details" %}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{{ patient.first_name|first }}{{ patient.last_name|first }}

{{ patient.get_full_name }} {% if patient.first_name_ar or patient.last_name_ar %} {{ patient.first_name_ar|default:'' }} {{ patient.last_name_ar|default:'' }} {% endif %}

{% trans "MRN" %}: {{ patient.mrn }} {% if patient.national_id %} {% trans "SSN" %}: {{ patient.national_id }} {% endif %} {% if patient.phone %} {{ patient.phone }} {% endif %} {% if patient.nationality %} {{ patient.nationality }} {% endif %}
{% trans "Edit" %} {% if request.user.is_px_admin %} {% trans "Delete" %} {% endif %}

{% trans "Patient Information" %}

{% trans "First Name" %}

{{ patient.first_name|default:"-" }}

{% if patient.first_name_ar %}

{{ patient.first_name_ar }}

{% endif %}

{% trans "Last Name" %}

{{ patient.last_name|default:"-" }}

{% if patient.last_name_ar %}

{{ patient.last_name_ar }}

{% endif %}

{% trans "Gender" %}

{{ patient.get_gender_display|default:"-" }}

{% trans "Date of Birth" %}

{{ patient.date_of_birth|default:"-" }}

{% trans "Nationality" %}

{{ patient.nationality|default:"-" }}

{% trans "Phone" %}

{{ patient.phone|default:"-" }}

{% trans "Email" %}

{{ patient.email|default:"-" }}

{% trans "City" %}

{{ patient.city|default:"-" }}

{% trans "Status" %}

{{ patient.get_status_display }}
{% if tab == 'visits' %}
{% for visit in his_visits %} {% empty %} {% endfor %}
{% trans "Adm ID" %} {% trans "Type" %} {% trans "Dates" %} {% trans "Doctor" %} {% trans "Insurance" %} {% trans "Status" %} {% trans "Journey" %}
{{ visit.admission_id }}
{{ visit.patient_type }} {% if visit.is_vip %}VIP{% endif %}
{{ visit.admit_date|date:"d M Y H:i"|default:"-" }}
{% if visit.discharge_date %}
{{ visit.discharge_date|date:"d M Y H:i" }}
{% else %} {% trans "In Progress" %} {% endif %}
{% if visit.primary_doctor_fk %} {{ visit.primary_doctor_fk }} {% else %} {{ visit.doctor_display }} {% endif %} {% if visit.insurance_company_name %} {{ visit.insurance_company_name }} {% else %} - {% endif %} {% if visit.bill_type %} {{ visit.bill_type }} {% endif %} {% if visit.is_visit_complete %} {% trans "Complete" %} {% elif visit.survey_instance %} {% trans "Survey Sent" %} {% else %} {% trans "Active" %} {% endif %} {% trans "View" %}

{% trans "No HIS visits found" %}

{% elif tab == 'surveys' %}
{% for survey in surveys %}

{{ survey.survey_template.name }}

{% if survey.sent_at %} {{ survey.sent_at|date:"d M Y H:i" }} {% endif %} {% if survey.completed_at %} {{ survey.completed_at|date:"d M Y H:i" }} {% endif %} {% if survey.delivery_channel %} {{ survey.delivery_channel|upper }} {% endif %}
{% if survey.total_score %}
{{ survey.total_score }} {% trans "Score" %}
{% endif %} {{ survey.get_status_display }}
{% empty %}

{% trans "No surveys found" %}

{% endfor %}
{% elif tab == 'complaints' %}
{% for complaint in complaints %}
{{ complaint.reference_number|default:"-" }} {% if complaint.priority %} {% endif %}

{{ complaint.title }}

{{ complaint.created_at|date:"d M Y" }} {% if complaint.department %} {{ complaint.department.name }} {% endif %}
{{ complaint.get_status_display }}
{% empty %}

{% trans "No complaints found" %}

{% endfor %}
{% elif tab == 'inquiries' %}
{% for inquiry in inquiries %}

{{ inquiry.subject }}

{{ inquiry.created_at|date:"d M Y" }} {{ inquiry.category }} {% if inquiry.department %} {{ inquiry.department.name }} {% endif %}
{{ inquiry.get_status_display }}
{% empty %}

{% trans "No inquiries found" %}

{% endfor %}
{% endif %}

{% trans "Summary" %}

{% trans "Hospital" %}

{{ patient.primary_hospital.name|default:"-" }}

{% if patient.primary_hospital.name_ar %}

{{ patient.primary_hospital.name_ar }}

{% endif %}

{% trans "Record Info" %}

{% trans "Created" %}
{{ patient.created_at|date:"d M Y H:i" }}
{% trans "Updated" %}
{{ patient.updated_at|date:"d M Y H:i" }}
{% endblock %} {% block extra_js %} {% endblock %}