{% extends 'base.html.twig' %} {% block title %}Immunizations{% endblock %} {% import "macros/action_buttons.html.twig" as actions %} {% block content %} {% set readiness = submitReadiness|default({ ready: false, reason: null, doseCount: 0 }) %}

Immunizations — {{ patient.name|title }} ({{ patient.uhId }})

{{ actions.top_button_back(path('immunization_index'), 'mr-2') }} Patient Print / View Card {% if recordEnabled|default(false) %}
{% if readiness.ready %}
{% else %} {% endif %} {% endif %}
{{ include('parts/flash.html.twig') }} {# The visit doses are recorded into, and the MRD that becomes this visit's ABDM care context. Shown before any dose is given so the MRD is never something that silently appears afterwards. #} {% if recordEnabled|default(false) %} {% set visit = activeVisit|default(null) %} {% if visit %} {% else %} {% endif %} {% endif %} {% if recordEnabled|default(false) and not readiness.ready and readiness.reason %} {% endif %} {% set expandedScheduledImmunizationIds = expandedScheduledImmunizationIds|default([]) %}

Immunization Schedule Done {{ summary.completedCount }} Due {{ summary.dueCount }} Overdue {{ summary.overdueCount }} Upcoming {{ summary.upcomingCount }}

{% if recordEnabled|default(false) %} {% endif %} {% for visit in summary.visits %} {% set visitRecordFormCount = 0 %} {% for row in visit.rows %} {% if recordForms[row.scheduledImmunizationId]|default(null) is not null %} {% set visitRecordFormCount = visitRecordFormCount + 1 %} {% endif %} {% endfor %} {% set visitRowspan = visit.rows|length + visitRecordFormCount %} {% for row in visit.rows %} {% set recordForm = recordForms[row.scheduledImmunizationId]|default(null) %} {% set isExpanded = row.scheduledImmunizationId in expandedScheduledImmunizationIds %} {% if loop.first %} {% endif %} {% if recordEnabled|default(false) %} {% endif %} {% if recordForm %} {% endif %} {% endfor %} {% else %} {% endfor %}
Visit Vaccine Time Period
start to end
Due Date Given Date Timing Remarks Status 
{{ visit.visitName }} {{ row.displayLabel ?: row.vaccineName }} {{ row.windowLabel }} {{ row.recommendedDate ? row.recommendedDate|date('d/m/Y') : '-' }} {{ row.administeredAt ? row.administeredAt|date('d/m/Y') : '-' }} {% set timing = row.timing %} {% if timing %} {{ timing.text }} {% else %} - {% endif %} {{ row.note ? row.note|title : '-' }} {% if row.status == 'completed' %} Completed {% elseif row.status == 'overdue' %} Overdue {% elseif row.status == 'due' %} Due {% else %} Upcoming {% endif %} {% if recordForm %} {% else %} — {% endif %}
{{ form_start(recordForm, { attr: { class: 'kt-form prevent-double-submit' } }) }} {{ form_errors(recordForm) }}
{{ form_label(recordForm.administeredAt, null, { label_attr: { class: 'kt-font-bold' } }) }} {{ form_widget(recordForm.administeredAt, { attr: { class: 'form-control' } }) }} {{ form_errors(recordForm.administeredAt) }}
{{ form_label(recordForm.administrationSource, null, { label_attr: { class: 'kt-font-bold' } }) }} {{ form_widget(recordForm.administrationSource, { attr: { class: 'form-select' } }) }} {{ form_errors(recordForm.administrationSource) }}
{{ form_label(recordForm.note, null, { label_attr: { class: 'kt-font-bold' } }) }} {{ form_widget(recordForm.note, { attr: { class: 'form-control' } }) }} {{ form_errors(recordForm.note) }}
{{ form_end(recordForm) }}
{{ include('parts/empty_state.html.twig', { icon: 'fa-list', title: 'No Schedule Found', text: 'No immunization schedule rows are configured.' }) }}
{% endblock %} {% block scripts %} {{ parent() }} {% endblock %}