{% load edc_dashboard_extras %} {% load i18n l10n tz %} {% load static %} {% load edc_adverse_event_extras %} {% has_perms_for_tmg_role as may_access_page %} {% if may_access_page %}
{% if not results %}
{{ empty_message }}
{% endif %} {% has_perms_for_tmg_role as may_access_page %} {% if may_access_page %} {% for result in results %}
{{ forloop.counter }} {{ result.subject_identifier }} {% copy_string_to_clipboard_button result.subject_identifier %} {{ utc_date|timeuntil:result.report_datetime.date }} ago
TMG documents in workflow
{# {% render_tmg_panel action_item=result by_user_created_only=True counter=forloop.counter report_status=result.reference_obj.report_status next_url_name=listboard_filter_url %} #} {# AE TMG #} {% ae_tmg_queryset subject_identifier=result.subject_identifier as qs %} {% if qs.count == 0 %} {% ae_tmg_action_item subject_identifier=result.subject_identifier as tmg_action_item %} {% if tmg_action_item %} {% render_tmg_panel action_item=tmg_action_item by_user_created_only=True counter=forloop.counter report_status=result.reference_obj.report_status next_url_name=listboard_filter_url %} {% endif %} {% else %} {% for ae_tmg in qs %} {% render_tmg_panel reference_obj=ae_tmg by_user_created_only=True counter=forloop.counter next_url_name=listboard_filter_url %} {% endfor %} {% endif %} {# DEATH REPORT TMG #} {% death_report_tmg_queryset subject_identifier=result.subject_identifier as qs %} {% if qs.count == 0 %} {% death_report_tmg_action_item subject_identifier=result.subject_identifier as tmg_action_item %} {% if tmg_action_item %} {% render_tmg_panel action_item=tmg_action_item by_user_created_only=True counter=forloop.counter report_status=result.reference_obj.report_status next_url_name=listboard_filter_url %} {% endif %} {% else %} {% for death_report_tmg in qs %} {% render_tmg_panel reference_obj=death_report_tmg by_user_created_only=True counter=forloop.counter next_url_name=listboard_filter_url %} {% endfor %} {% endif %} {# DEATH REPORT SECOND TMG #} {% death_report_tmg2_queryset subject_identifier=result.subject_identifier as qs %} {% if qs.count == 0 %} {% death_report_tmg_second_action_item subject_identifier=result.subject_identifier as tmg_action_item %} {% if tmg_action_item %} {% render_tmg_panel action_item=tmg_action_item by_user_created_only=True counter=forloop.counter report_status=result.reference_obj.report_status next_url_name=listboard_filter_url %} {% endif %} {% else %} {% for death_report_tmg in qs %} {% render_tmg_panel reference_obj=death_report_tmg by_user_created_only=True counter=forloop.counter next_url_name=listboard_filter_url %} {% endfor %} {% endif %}
{# First document in workflow #}
{# AE INTIAL #}
First document in workflow
{% if result.parent_action_item %} {% render_tmg_panel action_item=result.parent_action_item counter=forloop.counter next_url_name=listboard_filter_url %} {% if result.related_action_item and result.parent_action_item.reference_obj.action_identifier != result.related_action_item.reference_obj.action_identifier %} {% render_tmg_panel action_item=result.related_action_item counter=forloop.counter next_url_name=listboard_filter_url %} {% endif %} {% endif %}
{# Clinical documents in workflow #}
Clinical documents in workflow
{% ae_followup_queryset ae_initial=result.parent_action_item.reference_obj as qs %} {% if qs.count == 0 %}
There are no follow-ups to this AE
{% endif %} {% for ae_followup in qs %} {% render_tmg_panel reference_obj=ae_followup counter=forloop.counter next_url_name=listboard_filter_url %} {% endfor %} {% death_report_queryset subject_identifier=result.subject_identifier as qs %} {% for death_report in qs %} {% render_tmg_panel reference_obj=death_report counter=forloop.counter next_url_name=listboard_filter_url %} {% endfor %}
{% endfor %} {% else %}
You do not have permissions to view this page. Only users with the TMG Role are allowed access. Check with your administrator.
{% endif %}
{% paginator_row %}
{% endif %}