{% extends "base.html" %} {% load static %} {% block title %}{{ lab_test.test_name }} - Lab Test Details - {{ block.super }}{% endblock %} {% block content %}

{{ lab_test.test_name }}

{% if perms.laboratory.change_labtest %} Edit Test {% endif %}
Test Information
Test Code: {{ lab_test.test_code }}
Category: {{ lab_test.get_category_display }}
Sample Type: {{ lab_test.get_sample_type_display }}
Result Type: {{ lab_test.get_result_type_display }}
Unit: {{ lab_test.unit|default:"N/A" }}
TAT (Hours): {{ lab_test.turnaround_time_hours }}
Price: ${{ lab_test.price|floatformat:2 }}
Status: {% if lab_test.is_active %} Active {% else %} Inactive {% endif %}
Critical Test: {% if lab_test.is_critical %} Yes {% else %} No {% endif %}
Created: {{ lab_test.created_at|date:"M d, Y" }}
{% if lab_test.test_description %}
Description:

{{ lab_test.test_description }}

{% endif %} {% if lab_test.preparation_instructions %}
Preparation Instructions:
{{ lab_test.preparation_instructions }}
{% endif %}
Test Statistics
{{ recent_orders.count }}
Recent Orders
{{ reference_ranges.count }}
Reference Ranges
{{ qc_records.count }}
QC Records
${{ lab_test.price|floatformat:0 }}
Price
{% if reference_ranges %}
Reference Ranges
Add Range
{% for range in reference_ranges %} {% endfor %}
Gender Age Range Normal Range Critical Low Critical High Actions
{{ range.get_gender_display }} {{ range.age_min }} - {{ range.age_max|default:"∞" }} years {{ range.normal_min }} - {{ range.normal_max }} {{ range.critical_low|default:"N/A" }} {{ range.critical_high|default:"N/A" }}
{% if perms.laboratory.change_referencerange %} {% endif %}
{% endif %}
Recent Orders
View All
{% if recent_orders %}
{% for order in recent_orders %} {% endfor %}
Patient Status Ordered Actions
{{ order.patient.get_full_name }}
{{ order.patient.mrn }}
{{ order.get_status_display }} {{ order.order_datetime|date:"M d, H:i" }}
{% else %}
No recent orders

Orders for this test will appear here

{% endif %}
Quality Control
Add QC
{% if qc_records %}
{% for qc in qc_records %} {% endfor %}
Date Level Result Status Actions
{{ qc.test_date|date:"M d" }} {{ qc.get_control_level_display }} {{ qc.result_value }} {% if qc.is_within_range %}In Range{% else %}Out of Range{% endif %}
{% else %}
No QC records

Quality control records will appear here

Add First QC Record
{% endif %}
{% endblock %}