{% extends 'base.html' %} {% load static %} {% block title %}{% if form.instance.pk %}Edit Blood Unit{% else %}Register Blood Unit{% endif %}{% endblock %} {% block css %} {% endblock %} {% block content %}

{% if form.instance.pk %} Edit Blood Unit {{ form.instance.unit_number }} {% else %} Register Blood Unit new collection {% endif %}

Blood Unit Information

{% if donor %} Donor: {{ donor.full_name }} {% endif %}
{% csrf_token %} {% if not donor %}
Donor Selection
{% if form.donor.errors %}
{{ form.donor.errors.0 }}
{% endif %}
Select a donor to check eligibility
{% else %}
Donor Information

Name: {{ donor.full_name }}

Donor ID: {{ donor.donor_id }}

Blood Group: {{ donor.blood_group.display_name }}

Last Donation: {{ donor.last_donation_date|date:"M d, Y"|default:"Never" }}

Total Donations: {{ donor.total_donations }}

Status: {% if donor.is_eligible %}Eligible{% else %}Check Required{% endif %}

{% endif %}
Collection Details
{% if form.collection_date.errors %}
{{ form.collection_date.errors.0 }}
{% endif %}
{% if form.collection_time.errors %}
{{ form.collection_time.errors.0 }}
{% endif %}
{% if form.collected_by.errors %}
{{ form.collected_by.errors.0 }}
{% endif %}
Component & Volume
{% if form.component.errors %}
{{ form.component.errors.0 }}
{% endif %}
{% if form.volume_ml.errors %}
{{ form.volume_ml.errors.0 }}
{% endif %}
Storage Information
{% if form.location.errors %}
{{ form.location.errors.0 }}
{% endif %}
Select a location to view capacity
Additional Information
{% if form.notes.errors %}
{{ form.notes.errors.0 }}
{% endif %}
Unit Preview

Unit Number: Will be auto-generated

Donor: {{ donor.full_name|default:'Not selected' }}

Blood Group: {{ donor.blood_group.display_name|default:'Unknown' }}

Component: Not selected

Volume: 0 ml

Collection Date: Not set

Expiry Date: Not calculated

Blood Unit Barcode
||||| |||| |||||
Cancel
{% endblock %} {% block js %} {% endblock %}