{% extends "layouts/base.html" %} {% load i18n static %} {% block title %}{% trans "HIS Log" %} #{{ log.request_id }} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{% trans "HIS Log" %} #{{ log.request_id }}

{% trans "Request and response details" %}

{% trans "Channel" %}:
{% if log.channel == 'email' %}📧 {% trans "Email" %} {% elif log.channel == 'sms' %}📱 {% trans "SMS" %} {% else %}🏥 {% trans "HIS Event" %}{% endif %}
{% trans "Status" %}:
{{ log.get_status_display_with_icon }}
{% trans "Timestamp" %}:
{{ log.timestamp|date:"Y-m-d H:i:s" }}
{% trans "Processing Time" %}:
{% if log.processing_time_ms %} {{ log.processing_time_ms }}ms {% else %} - {% endif %}
{% if log.ip_address or log.user_agent %}
{% if log.ip_address %}
{% trans "IP Address" %}:
{{ log.ip_address }}
{% endif %} {% if log.user_agent %}
{% trans "User Agent" %}:
{{ log.user_agent|truncatechars:100 }}
{% endif %}
{% endif %}
{% if related_objects %}
{% trans "Related Objects" %}
{% if related_objects.patient %} {% endif %} {% if related_objects.journey %} {% endif %} {% if related_objects.survey %} {% endif %}
{% endif %}
{% trans "Request Details" %}
{% if log.recipient %}
{% trans "Recipient" %}:
{{ log.recipient }}
{% endif %} {% if log.subject %}
{% trans "Subject" %}:
{{ log.subject }}
{% endif %} {% if log.event_type %}
{% trans "Event Type" %}:
{{ log.event_type }}
{% if log.visit_type %}
{% trans "Visit Type" %}:
{{ log.visit_type|upper }}
{% endif %} {% if log.department %}
{% trans "Department" %}:
{{ log.department }}
{% endif %}
{% endif %} {% if log.hospital_code %}
{% trans "Hospital" %}:
{{ log.hospital_code }}
{% if log.patient_id %}
{% trans "Patient MRN" %}:
{{ log.patient_id }}
{% endif %} {% if log.journey_id %}
{% trans "Journey ID" %}:
{{ log.journey_id }}
{% endif %}
{% endif %}
{% trans "Request Payload" %}
{{ payload_formatted }}
{% if response_formatted %}
{% trans "Response Data" %}
{{ response_formatted }}
{% endif %} {% if log.error_message %}
{% trans "Error Details" %}
{{ log.error_message }}
{% endif %} {% if log.message_preview %}
{% trans "Message Preview" %}
{{ log.message_preview }}
{% endif %}
{% endblock %}