diff --git a/crc/static/bpmn/documents_approvals/documents_approvals.bpmn b/crc/static/bpmn/documents_approvals/documents_approvals.bpmn index 42b6083c..bf39615b 100644 --- a/crc/static/bpmn/documents_approvals/documents_approvals.bpmn +++ b/crc/static/bpmn/documents_approvals/documents_approvals.bpmn @@ -13,10 +13,14 @@ # Documents & Approvals > ## Protocol Document Management -{% if StudyInfo.protocol is defined -%} -{%- set p = StudyInfo.protocol -%} - -> [{{p.name}}](/study/{{p.study_id}}/workflow/{{p.workflow_id}}/task/{{p.task_id}}) +{% if StudyInfo.documents.Study_Protocol_Document is defined -%} +{%- set p = StudyInfo.documents.Study_Protocol_Document -%} +{% if p.files|length -%} +{%- set f = p.files[0] -%} +> [{{p.display_name}}](/study/{{p.study_id}}/workflow/{{f.workflow_id}}/task/{{f.task_id}}) +{%- else -%} +> No protocol uploaded yet. +{% endif %} {%- else -%} > No protocol uploaded yet. {% endif %} @@ -31,13 +35,14 @@ > ## Documents > | Name | Status | Help | Download | |:---- |:------ |:---- |:-------- | -{% for doc in StudyInfo.documents -%} - {% if doc.file_id is defined -%} +{% for key, doc in StudyInfo.documents.items() %}{% if doc.required -%} + {% if doc.files|length -%} | [{{doc.display_name}}](/study/{{doc.study_id}}/workflow/{{doc.workflow_id}}/task/{{doc.task_id}}) | {{doc.status}} | [Context here](/help/documents/{{doc.code}}) | [Download](/file/{{doc.file_id}}/data) | {%- else -%} | {{doc.display_name}} | Not started | [?](/help/documents/{{doc.code}}) | No file yet | {%- endif %} -{% endfor %} +{% endif %}{% endfor %} + @@ -52,25 +57,19 @@ StudyInfo approvals - Flow_0w20w9j + Flow_1k3su2q Flow_0c7ryff - StudyInfo documents_status + StudyInfo documents - - - Flow_1k3su2q - Flow_0w20w9j - StudyInfo protocol - - + - + @@ -99,13 +98,6 @@ - - - - - - -