{% extends 'base.html.twig' %} {% block title %}Immunization Register{% endblock %} {% import "macros/action_buttons.html.twig" as actions %} {% block content %}
{# Children reception flagged with the "Immunization" patient category — the day's worklist, so the pediatrician does not search by name. #} {% if flagged|default([]) %}

Flagged by Reception {{ flagged|length }} here for vaccines

{% for entry in flagged %} {% set patient = entry.patient %} {% set summary = entry.summary %} {% endfor %}
Sr. No. Patient Name UH ID Age Case / MRD No. Due Overdue ABHA Actions
{{ loop.index }} {{ patient.name|title }} {{ patient.uhId }} {{ patient.age }} {{ entry.case.mrdId }} {% if summary and summary.dueCount > 0 %} {{ summary.dueCount }} {% else %} — {% endif %} {% if summary and summary.overdueCount > 0 %} {{ summary.overdueCount }} {% else %} — {% endif %} {% if patient.healthAddress %} {% else %} {% endif %} {{ actions.top_button(path('immunization_show', { id: patient.id|nzo_encrypt }), 'Record Immunization', 'btn-brand btn-sm') }}
{% endif %}

Immunization Register

{{ actions.top_button_back(path('dashboard'), 'mr-2') }} {{ actions.top_button(path('patient_index'), 'Find Patient', 'btn-brand') }}
{{ include('parts/flash.html.twig') }}
{% if keywords or filter != 'pending' %} Reset {% endif %}
{% for row in rows %} {% set patient = row.patient %} {% set summary = row.summary %} {% else %} {% endfor %}
Sr. No. Patient UHID Age Mobile Done Due Overdue ABHA Actions
{{ loop.index }} {{ patient.name|title }} {{ patient.uhId }} {{ patient.age }} {{ patient.mobile ?: '—' }} {{ summary.completedCount }} {% if summary.dueCount > 0 %} {{ summary.dueCount }} {% else %} — {% endif %} {% if summary.overdueCount > 0 %} {{ summary.overdueCount }} {% else %} — {% endif %} {% if patient.healthAddress %} {% else %} {% endif %} {# Opens today's visit (issuing the MRD if there isn't one) and lands on the schedule, so the MRD exists before the first dose. #}
{{ actions.action_button(path('immunization_show', { id: patient.id | nzo_encrypt }), 'fa fa-syringe mx-2', 'Immunization Record') }} {{ actions.action_button(path('patient_show', { id: patient.id | nzo_encrypt }), 'fa far fa-eye mx-2', 'View Patient') }} {# Plain anchor, not the macro: the card auto-runs window.print(), so it must open in its own tab. #}
{% if pageCount > 0 %} {{ include('parts/empty_state.html.twig', { icon: 'fa-check-circle', title: 'Nothing Due On This Page', text: 'No child on this page has a due or overdue vaccine. Switch "Show" to All children to see the full register.' }) }} {% else %} {{ include('parts/empty_state.html.twig', { icon: 'fa-syringe', title: 'No Children Found', text: 'Only living, active patients with a date of birth appear in the immunization register.' }) }} {% endif %}
{{ include('parts/pagination.html.twig', { lastPage: last_page }) }}
{% endblock %}