{% extends 'base.html' %} {% block content %}

Órdenes

Emisión documental clínica centralizada para recetas, prácticas, informes y resultados.

{% for kind in order_kind_options %} {{ kind.name }} {% endfor %}
Limpiar
{{ active_kind_meta.plural }}
{{ selected_patient.nombre_completo if selected_patient else 'Primero buscá un paciente para trabajar con sus documentos.' }}
{% if selected_patient %}
Paciente actual: {{ selected_patient.nombre_completo }}
{% endif %}
{% if not selected_patient_id and not request.args.get('q') %}

Buscá un paciente para ver sus {{ active_kind_meta.plural|lower }}

Esto mejora la seguridad operativa y evita emitir documentos sobre un paciente equivocado.

{% else %}
{% for item in recipes %} {% else %} {% endfor %}
Fecha Paciente Profesional Documento Detalle Estado Acciones
{{ item.prescription_date.strftime('%d/%m/%Y') }}
{{ item.issued_at.strftime('%H:%M') if item.issued_at else '' }}
{{ item.patient_full_name }}
DNI {{ item.patient_document }}
{{ item.professional_display_name }}
{{ item.professional_specialty or item.professional_profession_name or '—' }}
{{ item.document_title or item.medication_generic_name or active_kind_meta.label }}
{{ item.legal_number }}
{% if item.cuir %}
{{ item.cuir }}
{% endif %}
{% if active_kind == 'recipe' %} {{ item.medication_presentation or '—' }}{% if item.pharmaceutical_form %} · {{ item.pharmaceutical_form }}{% endif %} {% if item.quantity_units %}
Cantidad: {{ item.quantity_units }}
{% endif %} {% else %} {{ (item.document_body or item.dosage_instructions or 'Sin detalle')[:120] }}{% if (item.document_body or item.dosage_instructions or '')|length > 120 %}...{% endif %} {% endif %}
{{ item.computed_status }}
PDF {% if active_kind == 'recipe' %} Verificar {% endif %}
Todavía no hay {{ active_kind_meta.plural|lower }} registradas para este criterio.
{% endif %}
{% if pagination and pagination.pages > 1 %} {% endif %} {% endblock %} {% block scripts %} {{ super() }} {% endblock %}