{% extends edc_base_template %} {% load static %} {% block main %} {{ block.super }}
Edc PharmacyRepack › {{ repack_request.repack_identifier }}
{# ── Repack request summary ── #}
Repack request {{ repack_request.repack_identifier }}   {% if confirmed_qty == repack_request.item_qty_repack and repack_request.item_qty_repack %} All confirmed {% elif repack_request.item_qty_processed > 0 and confirmed_qty > 0 %} {{ confirmed_qty }} confirmed, {{ unconfirmed_qty }} unconfirmed {% elif repack_request.item_qty_processed > 0 %} Processed — awaiting confirmation {% elif repack_request.task_id %} Processing… {% else %} New {% endif %}
Bulk stock code {{ repack_request.from_stock.code }} Product {{ repack_request.from_stock.product.name }}
Assignment {{ repack_request.from_stock.product.assignment.display_name|default:"—" }} Lot / Batch {{ repack_request.from_stock.lot.lot_no|default:"—" }}
Target container {{ repack_request.container }} Units per container {{ repack_request.container_unit_qty }}
Containers requested {{ repack_request.item_qty_repack }} Containers processed {{ repack_request.item_qty_processed }}
Units processed {{ repack_request.unit_qty_processed }} Confirmed {{ confirmed_qty }} / {{ repack_request.item_qty_repack }}
Date {{ repack_request.repack_datetime|date:"d-M-Y H:i" }} Created by {{ repack_request.user_created|default:"—" }}
{# ── Action buttons ── #}
{# Edit — only before processing #} {% if not repack_request.item_qty_processed %} Edit {% endif %} {# Process — only if not yet processed and no pending task #} {% if not repack_request.item_qty_processed and not repack_request.task_id %}
{% csrf_token %}
{% elif repack_request.task_id and not repack_request.item_qty_processed %} Processing… {% endif %} {# Print labels + Confirm — once stock rows exist #} {% if repack_request.item_qty_processed %} Edit
{% csrf_token %}
{% if unconfirmed_qty > 0 %}
{% csrf_token %}
{% else %} All confirmed {% endif %} {% endif %} Audit trail
{# ── Instructions ── #}
Instructions
  1. Fill in a repack request and Save.
  2. Click Process — the system creates one stock record per container. Allow a moment if processing in background.
  3. Click Print labels and print at 100% scale (do not fit to page).
  4. Affix each printed label to its physical container.
  5. Click Confirm labelled stock and scan each barcode to confirm.

Process only one medication type (Active or Placebo) at a time in the work area.

← All repack requests

{% endblock main %}