{% if factura %} {% if factura_view and factura_view.is_structured %}

Soporte administrativo

Consulta de factura

Revisa la información persistida de la factura, sus líneas y la referencia tarifaria SOAT.

{{ factura_view.canonical_lines|length }} líneas canónicas {% if factura_view.patient_name %}{{ factura_view.patient_name }}{% endif %}
{% for group in factura_view.identity_groups %}

{{ group.title }}

{% for field in group.fields %}
{{ field.label }}
{% if field.value and field.is_date %}{% else %}{{ field.value or 'No informado' }}{% endif %}
{% endfor %}
{% endfor %}

Detalle económico

Líneas canónicas

{{ factura_view.canonical_lines|length }}
{% if factura_view.canonical_lines %}
{% for line in factura_view.canonical_lines %} {% endfor %}
Líneas canónicas de la factura
FechaCódigo facturaReferencia / CUPSDescripciónCategoríaCantidadValor unitarioTotal
{% if line.fecha_servicio and line.fecha_servicio != '—' %}{% else %}—{% endif %} {{ line.codigo_facturacion or '—' }} {{ line.codigo_referencia or '—' }} {{ line.descripcion or '—' }} {{ line.categoria or '—' }} {{ line.cantidad or '—' }} {{ line.valor_unitario or '—' }} {{ line.total or '—' }}
{% else %}

No hay líneas canónicas persistidas.

{% endif %}

Cierre declarado

Resumen financiero

{% for item in factura_view.financial %}
{{ item.label }}
{{ item.value }}
{% endfor %}

Trazabilidad

Observaciones

{% if factura_view.observations %}
    {% for observation in factura_view.observations %}
  • {{ observation }}
  • {% endfor %}
{% else %}

Sin observaciones persistidas.

{% endif %}
{% else %}
💰 Información de Factura
{{ factura_view.legacy_html if factura_view and factura_view.legacy_html else factura.analisis_html|safe }}

Procesamiento Inteligente: Los procedimientos de factura se procesan automáticamente al generar la epicrisis.

{% endif %} {% else %}

Soporte administrativo

Factura no disponible

No hay un análisis de factura asociado a este caso. La pestaña permanecerá disponible cuando se incorpore el documento.

{% endif %}