agdar/psychology/templates/psychology/consultation_detail.html
Marwan Alwali 2f1681b18c update
2025-11-11 13:44:48 +03:00

271 lines
11 KiB
HTML

{% extends "psychology/base.html" %}
{% load i18n %}
{% block title %}{% trans "Consultation Detail" %} - {{ consultation.patient.get_full_name }}{% endblock %}
{% block breadcrumb %}
<li class="breadcrumb-item"><a href="{% url 'psychology:consultation_list' %}">{% trans "Consultations" %}</a></li>
<li class="breadcrumb-item active">{% trans "Detail" %}</li>
{% endblock %}
{% block psychology_content %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h2><i class="bi bi-journal-medical"></i> {% trans "Psychology Consultation" %}</h2>
<div>
<a href="{% url 'psychology:consultation_update' consultation.pk %}" class="btn btn-secondary">
<i class="bi bi-pencil"></i> {% trans "Edit" %}
</a>
<a href="{% url 'psychology:consultation_list' %}" class="btn btn-outline-secondary">
<i class="bi bi-arrow-left"></i> {% trans "Back to List" %}
</a>
</div>
</div>
<!-- Patient & Provider Info -->
<div class="card psychology-card mb-4">
<div class="card-header bg-primary text-white">
<h5 class="mb-0"><i class="bi bi-person"></i> {% trans "Patient & Provider Information" %}</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<p><strong>{% trans "Patient:" %}</strong> {{ consultation.patient.get_full_name }}</p>
<p><strong>{% trans "MRN:" %}</strong> {{ consultation.patient.mrn }}</p>
<p><strong>{% trans "Date of Birth:" %}</strong> {{ consultation.patient.date_of_birth|date:"Y-m-d" }}</p>
</div>
<div class="col-md-6">
<p><strong>{% trans "Consultation Date:" %}</strong> {{ consultation.consultation_date|date:"Y-m-d" }}</p>
<p><strong>{% trans "Provider:" %}</strong> {{ consultation.provider.get_full_name|default:"-" }}</p>
<p><strong>{% trans "Tenant:" %}</strong> {{ consultation.tenant.name }}</p>
</div>
</div>
</div>
</div>
<!-- Referral Information -->
<div class="card psychology-card mb-4">
<div class="card-header">
<h5 class="mb-0"><i class="bi bi-arrow-right-circle"></i> {% trans "Referral Information" %}</h5>
</div>
<div class="card-body">
<p><strong>{% trans "Referral Reason:" %}</strong>
<span class="badge bg-info">{{ consultation.get_referral_reason_display }}</span>
</p>
{% if consultation.referral_source %}
<p><strong>{% trans "Referral Source:" %}</strong> {{ consultation.referral_source }}</p>
{% endif %}
<p><strong>{% trans "Presenting Problem:" %}</strong></p>
<div class="alert alert-light">{{ consultation.presenting_problem|linebreaks }}</div>
</div>
</div>
<!-- Risk Assessment -->
{% if consultation.suicide_risk or consultation.homicide_risk %}
<div class="card psychology-card mb-4 border-danger">
<div class="card-header bg-danger text-white">
<h5 class="mb-0"><i class="bi bi-exclamation-triangle"></i> {% trans "Risk Assessment" %}</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<p><strong>{% trans "Suicide Risk:" %}</strong>
<span class="badge risk-badge-{{ consultation.suicide_risk|lower }}">
{{ consultation.get_suicide_risk_display|default:"-" }}
</span>
</p>
</div>
<div class="col-md-6">
<p><strong>{% trans "Homicide Risk:" %}</strong>
<span class="badge risk-badge-{{ consultation.homicide_risk|lower }}">
{{ consultation.get_homicide_risk_display|default:"-" }}
</span>
</p>
</div>
</div>
{% if consultation.risk_assessment_notes %}
<p><strong>{% trans "Risk Assessment Notes:" %}</strong></p>
<div class="alert alert-warning">{{ consultation.risk_assessment_notes|linebreaks }}</div>
{% endif %}
</div>
</div>
{% endif %}
<!-- Mental Status Examination -->
<div class="card psychology-card mb-4">
<div class="card-header">
<h5 class="mb-0"><i class="bi bi-clipboard-check"></i> {% trans "Mental Status Examination" %}</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
{% if consultation.appearance %}
<div class="mse-section">
<strong>{% trans "Appearance:" %}</strong>
<p>{{ consultation.appearance }}</p>
</div>
{% endif %}
{% if consultation.behavior %}
<div class="mse-section">
<strong>{% trans "Behavior:" %}</strong>
<p>{{ consultation.behavior }}</p>
</div>
{% endif %}
{% if consultation.mood %}
<div class="mse-section">
<strong>{% trans "Mood:" %}</strong>
<p>{{ consultation.mood }}</p>
</div>
{% endif %}
{% if consultation.affect %}
<div class="mse-section">
<strong>{% trans "Affect:" %}</strong>
<p>{{ consultation.affect }}</p>
</div>
{% endif %}
{% if consultation.speech %}
<div class="mse-section">
<strong>{% trans "Speech:" %}</strong>
<p>{{ consultation.speech }}</p>
</div>
{% endif %}
</div>
<div class="col-md-6">
{% if consultation.thought_process %}
<div class="mse-section">
<strong>{% trans "Thought Process:" %}</strong>
<p>{{ consultation.thought_process }}</p>
</div>
{% endif %}
{% if consultation.thought_content %}
<div class="mse-section">
<strong>{% trans "Thought Content:" %}</strong>
<p>{{ consultation.thought_content }}</p>
</div>
{% endif %}
{% if consultation.perception %}
<div class="mse-section">
<strong>{% trans "Perception:" %}</strong>
<p>{{ consultation.perception }}</p>
</div>
{% endif %}
{% if consultation.cognition %}
<div class="mse-section">
<strong>{% trans "Cognition:" %}</strong>
<p>{{ consultation.cognition }}</p>
</div>
{% endif %}
{% if consultation.insight %}
<div class="mse-section">
<strong>{% trans "Insight:" %}</strong>
<p>{{ consultation.insight }}</p>
</div>
{% endif %}
{% if consultation.judgment %}
<div class="mse-section">
<strong>{% trans "Judgment:" %}</strong>
<p>{{ consultation.judgment }}</p>
</div>
{% endif %}
</div>
</div>
</div>
</div>
<!-- Clinical Impressions & Treatment Plan -->
<div class="card psychology-card mb-4">
<div class="card-header">
<h5 class="mb-0"><i class="bi bi-lightbulb"></i> {% trans "Clinical Impressions & Treatment Plan" %}</h5>
</div>
<div class="card-body">
{% if consultation.clinical_impressions %}
<p><strong>{% trans "Clinical Impressions:" %}</strong></p>
<div class="alert alert-light">{{ consultation.clinical_impressions|linebreaks }}</div>
{% endif %}
{% if consultation.provisional_diagnosis %}
<p><strong>{% trans "Provisional Diagnosis:" %}</strong></p>
<div class="alert alert-light">{{ consultation.provisional_diagnosis|linebreaks }}</div>
{% endif %}
{% if consultation.treatment_goals %}
<p><strong>{% trans "Treatment Goals:" %}</strong></p>
<div class="alert alert-light">{{ consultation.treatment_goals|linebreaks }}</div>
{% endif %}
{% if consultation.treatment_approach %}
<p><strong>{% trans "Treatment Approach:" %}</strong></p>
<div class="alert alert-light">{{ consultation.treatment_approach|linebreaks }}</div>
{% endif %}
{% if consultation.recommendations %}
<p><strong>{% trans "Recommendations:" %}</strong></p>
<div class="alert alert-light">{{ consultation.recommendations|linebreaks }}</div>
{% endif %}
{% if consultation.frequency_duration %}
<p><strong>{% trans "Frequency & Duration:" %}</strong> {{ consultation.frequency_duration }}</p>
{% endif %}
</div>
</div>
<!-- Treatment Goals -->
{% if consultation.goals.exists %}
<div class="card psychology-card mb-4">
<div class="card-header">
<h5 class="mb-0"><i class="bi bi-bullseye"></i> {% trans "Treatment Goals" %}</h5>
</div>
<div class="card-body">
<div class="list-group">
{% for goal in consultation.goals.all %}
<div class="list-group-item">
<div class="d-flex justify-content-between align-items-start">
<div class="flex-grow-1">
<h6>{{ goal.goal_description }}</h6>
<p class="mb-1">
<span class="badge status-badge-{{ goal.status|lower }}">
{{ goal.get_status_display }}
</span>
<small class="text-muted ms-2">
{% trans "Target:" %} {{ goal.target_date|date:"Y-m-d"|default:"-" }}
</small>
</p>
<div class="progress-bar-container">
<div class="progress-bar-fill" style="width: {{ goal.progress_percentage }}%"></div>
</div>
<small class="text-muted">{{ goal.progress_percentage }}% {% trans "Complete" %}</small>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<!-- Signature -->
<div class="card psychology-card">
<div class="card-header">
<h5 class="mb-0"><i class="bi bi-pen"></i> {% trans "Signature" %}</h5>
</div>
<div class="card-body">
{% if consultation.signed_by %}
<p><strong>{% trans "Signed By:" %}</strong> {{ consultation.signed_by.get_full_name }}</p>
<p><strong>{% trans "Signed At:" %}</strong> {{ consultation.signed_at|date:"Y-m-d H:i" }}</p>
{% else %}
<div class="alert alert-warning">
<i class="bi bi-exclamation-triangle"></i> {% trans "This consultation has not been signed yet." %}
</div>
{% endif %}
</div>
</div>
{% endblock %}