Merge remote-tracking branch 'origin/chore/update_specs' into feature/previous_task
# Conflicts: # Pipfile.lock Assuring that all documents from the xls spreadsheet are loaded when doing validations.
This commit is contained in:
commit
07e58e923d
|
@ -61,32 +61,13 @@ class StudyInfo(Script):
|
||||||
"status": WorkflowStatus.not_started.value,
|
"status": WorkflowStatus.not_started.value,
|
||||||
"workflow_spec_id": "irb_api_details",
|
"workflow_spec_id": "irb_api_details",
|
||||||
},
|
},
|
||||||
"documents": {
|
|
||||||
"AD_CoCApp":
|
|
||||||
{
|
|
||||||
'category1': 'Ancillary Document',
|
|
||||||
'category2': 'CoC Application',
|
|
||||||
'category3': '',
|
|
||||||
'Who Uploads?': 'CRC',
|
|
||||||
'Id': '12',
|
|
||||||
'Name': 'Certificate of Confidentiality Application',
|
|
||||||
'count': 0,
|
|
||||||
'required': True,
|
|
||||||
'code': 'AD_CoCApp',
|
|
||||||
'display_name': 'Certificate of Confidentiality Application',
|
|
||||||
'file_id': 123,
|
|
||||||
'task_id': 'abcdef14236890',
|
|
||||||
'workflow_id': 456,
|
|
||||||
'workflow_spec_id': 'irb_api_details',
|
|
||||||
'status': 'complete',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'protocol': {
|
'protocol': {
|
||||||
id: 0,
|
id: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.add_data_to_task(task=task, data=data["study"])
|
self.add_data_to_task(task=task, data=data["study"])
|
||||||
|
self.add_data_to_task(task, {"documents": StudyService().get_documents_status(study_id)})
|
||||||
|
|
||||||
def do_task(self, task, study_id, *args, **kwargs):
|
def do_task(self, task, study_id, *args, **kwargs):
|
||||||
self.check_args(args)
|
self.check_args(args)
|
||||||
|
|
|
@ -104,7 +104,7 @@ class StudyService(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_documents_status(study_id):
|
def get_documents_status(study_id):
|
||||||
"""Returns a list of documents related to the study, if they are required, and any file information
|
"""Returns a list of documents related to the study, and any file information
|
||||||
that is available.."""
|
that is available.."""
|
||||||
|
|
||||||
# Get PB required docs
|
# Get PB required docs
|
||||||
|
|
Binary file not shown.
|
@ -70,6 +70,9 @@
|
||||||
<camunda:property id="placeholder" value="Limit Length: 11" />
|
<camunda:property id="placeholder" value="Limit Length: 11" />
|
||||||
<camunda:property id="hide_expression" value="model.CTG_NA && model.CTG_NA.enumNoRegister" />
|
<camunda:property id="hide_expression" value="model.CTG_NA && model.CTG_NA.enumNoRegister" />
|
||||||
</camunda:properties>
|
</camunda:properties>
|
||||||
|
<camunda:validation>
|
||||||
|
<camunda:constraint name="max_length" config="11" />
|
||||||
|
</camunda:validation>
|
||||||
</camunda:formField>
|
</camunda:formField>
|
||||||
<camunda:formField id="CTG_StudyType" label="ClinicalTrials.gov Study Type" type="enum">
|
<camunda:formField id="CTG_StudyType" label="ClinicalTrials.gov Study Type" type="enum">
|
||||||
<camunda:properties>
|
<camunda:properties>
|
||||||
|
@ -307,6 +310,18 @@
|
||||||
<bpmndi:BPMNShape id="StartEvent_1mhzkcr_di" bpmnElement="StartEvent_1mhzkcr">
|
<bpmndi:BPMNShape id="StartEvent_1mhzkcr_di" bpmnElement="StartEvent_1mhzkcr">
|
||||||
<dc:Bounds x="-218" y="307" width="36" height="36" />
|
<dc:Bounds x="-218" y="307" width="36" height="36" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="UserTask_1y1qon7_di" bpmnElement="UserTask_1y1qon7">
|
||||||
|
<dc:Bounds x="620" y="340" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="UserTask_01zzzg9_di" bpmnElement="UserTask_01zzzg9">
|
||||||
|
<dc:Bounds x="620" y="460" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="UserTask_0gtuk1e_di" bpmnElement="UserTask_EnterMultiSiteInfo">
|
||||||
|
<dc:Bounds x="620" y="210" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="UserTask_0ebxkp7_di" bpmnElement="UserTask_0ebxkp7">
|
||||||
|
<dc:Bounds x="620" y="90" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Activity_0vthni9_di" bpmnElement="Activity_10nxpt2">
|
<bpmndi:BPMNShape id="Activity_0vthni9_di" bpmnElement="Activity_10nxpt2">
|
||||||
<dc:Bounds x="-120" y="285" width="100" height="80" />
|
<dc:Bounds x="-120" y="285" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
|
@ -319,18 +334,6 @@
|
||||||
<bpmndi:BPMNShape id="Activity_0x7b58m_di" bpmnElement="Activity_PBMultiSiteCheckQ28">
|
<bpmndi:BPMNShape id="Activity_0x7b58m_di" bpmnElement="Activity_PBMultiSiteCheckQ28">
|
||||||
<dc:Bounds x="350" y="285" width="100" height="80" />
|
<dc:Bounds x="350" y="285" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="UserTask_01zzzg9_di" bpmnElement="UserTask_01zzzg9">
|
|
||||||
<dc:Bounds x="620" y="460" width="100" height="80" />
|
|
||||||
</bpmndi:BPMNShape>
|
|
||||||
<bpmndi:BPMNShape id="UserTask_1y1qon7_di" bpmnElement="UserTask_1y1qon7">
|
|
||||||
<dc:Bounds x="620" y="340" width="100" height="80" />
|
|
||||||
</bpmndi:BPMNShape>
|
|
||||||
<bpmndi:BPMNShape id="UserTask_0gtuk1e_di" bpmnElement="UserTask_EnterMultiSiteInfo">
|
|
||||||
<dc:Bounds x="620" y="210" width="100" height="80" />
|
|
||||||
</bpmndi:BPMNShape>
|
|
||||||
<bpmndi:BPMNShape id="UserTask_0ebxkp7_di" bpmnElement="UserTask_0ebxkp7">
|
|
||||||
<dc:Bounds x="620" y="90" width="100" height="80" />
|
|
||||||
</bpmndi:BPMNShape>
|
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
</bpmn:definitions>
|
</bpmn:definitions>
|
||||||
|
|
|
@ -119,14 +119,14 @@ If you have any questions about the process, contact contract negotiator or Offi
|
||||||
<di:waypoint x="682" y="337" />
|
<di:waypoint x="682" y="337" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
<bpmndi:BPMNEdge id="SequenceFlow_0afrh4e_di" bpmnElement="SequenceFlow_0afrh4e">
|
<bpmndi:BPMNEdge id="SequenceFlow_0afrh4e_di" bpmnElement="SequenceFlow_0afrh4e">
|
||||||
<di:waypoint x="460" y="160" />
|
<di:waypoint x="460" y="190" />
|
||||||
<di:waypoint x="570" y="160" />
|
<di:waypoint x="570" y="190" />
|
||||||
<di:waypoint x="570" y="312" />
|
<di:waypoint x="570" y="312" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
<bpmndi:BPMNEdge id="SequenceFlow_0bvhrqu_di" bpmnElement="SequenceFlow_0bvhrqu">
|
<bpmndi:BPMNEdge id="SequenceFlow_0bvhrqu_di" bpmnElement="SequenceFlow_0bvhrqu">
|
||||||
<di:waypoint x="250" y="312" />
|
<di:waypoint x="250" y="312" />
|
||||||
<di:waypoint x="250" y="160" />
|
<di:waypoint x="250" y="190" />
|
||||||
<di:waypoint x="360" y="160" />
|
<di:waypoint x="360" y="190" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
<bpmndi:BPMNEdge id="SequenceFlow_1uxqr6o_di" bpmnElement="SequenceFlow_1uxqr6o">
|
<bpmndi:BPMNEdge id="SequenceFlow_1uxqr6o_di" bpmnElement="SequenceFlow_1uxqr6o">
|
||||||
<di:waypoint x="158" y="337" />
|
<di:waypoint x="158" y="337" />
|
||||||
|
@ -144,14 +144,14 @@ If you have any questions about the process, contact contract negotiator or Offi
|
||||||
<bpmndi:BPMNShape id="ParallelGateway_0f68xmc_di" bpmnElement="ExclusiveGateway_0tqopul">
|
<bpmndi:BPMNShape id="ParallelGateway_0f68xmc_di" bpmnElement="ExclusiveGateway_0tqopul">
|
||||||
<dc:Bounds x="545" y="312" width="50" height="50" />
|
<dc:Bounds x="545" y="312" width="50" height="50" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="UserTask_1fv8l08_di" bpmnElement="Task_0xn3d6z">
|
|
||||||
<dc:Bounds x="360" y="430" width="100" height="80" />
|
|
||||||
</bpmndi:BPMNShape>
|
|
||||||
<bpmndi:BPMNShape id="UserTask_0tz5ojx_di" bpmnElement="Task_0dj66yz">
|
<bpmndi:BPMNShape id="UserTask_0tz5ojx_di" bpmnElement="Task_0dj66yz">
|
||||||
<dc:Bounds x="360" y="297" width="100" height="80" />
|
<dc:Bounds x="360" y="297" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="UserTask_1fv8l08_di" bpmnElement="Task_0xn3d6z">
|
||||||
|
<dc:Bounds x="360" y="430" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="UserTask_03iirsg_di" bpmnElement="UserTask_03iirsg">
|
<bpmndi:BPMNShape id="UserTask_03iirsg_di" bpmnElement="UserTask_03iirsg">
|
||||||
<dc:Bounds x="360" y="120" width="100" height="80" />
|
<dc:Bounds x="360" y="150" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
<camunda:formField id="HoldNotes" label="Why was this study moved to Hold Status?" type="textarea">
|
<camunda:formField id="HoldNotes" label="Why was this study moved to Hold Status?" type="textarea">
|
||||||
<camunda:properties>
|
<camunda:properties>
|
||||||
<camunda:property id="rows" value="5" />
|
<camunda:property id="rows" value="5" />
|
||||||
|
<camunda:property id="group" value="Reason for Hold Notes" />
|
||||||
|
<camunda:property id="repeat" value="Reason for Hold Notes" />
|
||||||
</camunda:properties>
|
</camunda:properties>
|
||||||
</camunda:formField>
|
</camunda:formField>
|
||||||
</camunda:formData>
|
</camunda:formData>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</inputExpression>
|
</inputExpression>
|
||||||
</input>
|
</input>
|
||||||
<output id="output_1" label="Investigator's Brochure(s) Uploaded?" name="isInvestigatorsBrochure" typeRef="boolean" />
|
<output id="output_1" label="Investigator's Brochure(s) Uploaded?" name="isInvestigatorsBrochure" typeRef="boolean" />
|
||||||
<output id="OutputClause_1f3mlfn" label="Investigator's Broshure Form Banner" name="ElementDoc_InvestigatorsBrochure" typeRef="string" />
|
<output id="OutputClause_1f3mlfn" label="Investigator's Brochure Form Banner" name="ElementDoc_InvestigatorsBrochure" typeRef="string" />
|
||||||
<rule id="DecisionRule_0zvgaym">
|
<rule id="DecisionRule_0zvgaym">
|
||||||
<inputEntry id="UnaryTests_0mwq0my">
|
<inputEntry id="UnaryTests_0mwq0my">
|
||||||
<text>0</text>
|
<text>0</text>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<decisionTable id="decisionTable_1">
|
<decisionTable id="decisionTable_1">
|
||||||
<input id="input_1" label="Pharmacy Manual Upload Count">
|
<input id="input_1" label="Pharmacy Manual Upload Count">
|
||||||
<inputExpression id="inputExpression_1" typeRef="integer">
|
<inputExpression id="inputExpression_1" typeRef="integer">
|
||||||
<text>StudyInfo.documents.DrugDevDoc_PharmManual.count</text>
|
<text>StudyInfo.documents["DrugDevDoc_PharmManual"]["count"]</text>
|
||||||
</inputExpression>
|
</inputExpression>
|
||||||
</input>
|
</input>
|
||||||
<output id="output_1" label="Pharmacy Manual(s) Uploaded?" name="isPharmacyManual" typeRef="boolean" />
|
<output id="output_1" label="Pharmacy Manual(s) Uploaded?" name="isPharmacyManual" typeRef="boolean" />
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
</extensionElements>
|
</extensionElements>
|
||||||
<decisionTable id="DecisionTable_1mjqwlv">
|
<decisionTable id="DecisionTable_1mjqwlv">
|
||||||
<input id="InputClause_18pwfqu" label="Required Doc Keys">
|
<input id="InputClause_18pwfqu" label="Required Doc Keys">
|
||||||
<inputExpression id="LiteralExpression_1y84stb" typeRef="boolean" expressionLanguage="feel">
|
<inputExpression id="LiteralExpression_1y84stb" typeRef="boolean" expressionLanguage="python">
|
||||||
<text>StudyInfo.documents.Study_DataSecurityPlan.required</text>
|
<text>StudyInfo.documents['Study_DataSecurityPlan']['required']</text>
|
||||||
</inputExpression>
|
</inputExpression>
|
||||||
</input>
|
</input>
|
||||||
<output id="OutputClause_05y0j7c" label="data_security_plan" name="data_security_plan" typeRef="string" />
|
<output id="OutputClause_05y0j7c" label="data_security_plan" name="data_security_plan" typeRef="string" />
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<decisionTable id="decisionTable_1">
|
<decisionTable id="decisionTable_1">
|
||||||
<input id="InputClause_1ki80j6" label="required doc ids">
|
<input id="InputClause_1ki80j6" label="required doc ids">
|
||||||
<inputExpression id="LiteralExpression_10mfcy7" typeRef="boolean" expressionLanguage="Python">
|
<inputExpression id="LiteralExpression_10mfcy7" typeRef="boolean" expressionLanguage="Python">
|
||||||
<text>StudyInfo.documents.UVACompl_PRCAppr.required</text>
|
<text>StudyInfo.documents['UVACompl_PRCAppr']['required']</text>
|
||||||
</inputExpression>
|
</inputExpression>
|
||||||
</input>
|
</input>
|
||||||
<output id="output_1" label="enter_core_info" name="enter_core_info" typeRef="string" />
|
<output id="output_1" label="enter_core_info" name="enter_core_info" typeRef="string" />
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1kudwnk" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
|
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1kudwnk" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||||
<bpmn:process id="Process_0jhpidf" isExecutable="true">
|
<bpmn:process id="Process_0jhpidf" isExecutable="true">
|
||||||
<bpmn:startEvent id="StartEvent_1">
|
<bpmn:startEvent id="StartEvent_1">
|
||||||
<bpmn:outgoing>SequenceFlow_1ees8ka</bpmn:outgoing>
|
<bpmn:outgoing>SequenceFlow_1ees8ka</bpmn:outgoing>
|
||||||
|
@ -26,7 +26,12 @@
|
||||||
<bpmn:outgoing>Flow_0pwtiqm</bpmn:outgoing>
|
<bpmn:outgoing>Flow_0pwtiqm</bpmn:outgoing>
|
||||||
</bpmn:parallelGateway>
|
</bpmn:parallelGateway>
|
||||||
<bpmn:sequenceFlow id="Flow_0pwtiqm" sourceRef="Gateway_12tpgcy" targetRef="Activity_0f295la" />
|
<bpmn:sequenceFlow id="Flow_0pwtiqm" sourceRef="Gateway_12tpgcy" targetRef="Activity_0f295la" />
|
||||||
<bpmn:parallelGateway id="Gateway_1nta7st">
|
<bpmn:parallelGateway id="Gateway_1nta7st" name="Some Name">
|
||||||
|
<bpmn:extensionElements>
|
||||||
|
<camunda:properties>
|
||||||
|
<camunda:property name="display_name" value="Some Name" />
|
||||||
|
</camunda:properties>
|
||||||
|
</bpmn:extensionElements>
|
||||||
<bpmn:incoming>SequenceFlow_17ct47v</bpmn:incoming>
|
<bpmn:incoming>SequenceFlow_17ct47v</bpmn:incoming>
|
||||||
<bpmn:outgoing>Flow_1m8285h</bpmn:outgoing>
|
<bpmn:outgoing>Flow_1m8285h</bpmn:outgoing>
|
||||||
<bpmn:outgoing>Flow_18pl92p</bpmn:outgoing>
|
<bpmn:outgoing>Flow_18pl92p</bpmn:outgoing>
|
||||||
|
@ -211,6 +216,9 @@
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Gateway_1m22g4p_di" bpmnElement="Gateway_1nta7st">
|
<bpmndi:BPMNShape id="Gateway_1m22g4p_di" bpmnElement="Gateway_1nta7st">
|
||||||
<dc:Bounds x="468" y="414" width="50" height="50" />
|
<dc:Bounds x="468" y="414" width="50" height="50" />
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds x="462" y="471" width="62" height="14" />
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Activity_16cm213_di" bpmnElement="Activity_16cm213">
|
<bpmndi:BPMNShape id="Activity_16cm213_di" bpmnElement="Activity_16cm213">
|
||||||
<dc:Bounds x="550" y="650" width="100" height="80" />
|
<dc:Bounds x="550" y="650" width="100" height="80" />
|
||||||
|
|
Binary file not shown.
|
@ -221,6 +221,7 @@ class ExampleDataLoader:
|
||||||
|
|
||||||
is_status = filename.lower() == 'status.bpmn'
|
is_status = filename.lower() == 'status.bpmn'
|
||||||
is_primary = filename.lower() == id + '.bpmn'
|
is_primary = filename.lower() == id + '.bpmn'
|
||||||
|
file = None
|
||||||
try:
|
try:
|
||||||
file = open(file_path, 'rb')
|
file = open(file_path, 'rb')
|
||||||
data = file.read()
|
data = file.read()
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 89073ca446a3
|
||||||
|
Revises: 1685be1cc232
|
||||||
|
Create Date: 2020-05-05 11:09:00.307363
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '89073ca446a3'
|
||||||
|
down_revision = '1685be1cc232'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_table('workflow_stats')
|
||||||
|
op.add_column('task_event', sa.Column('action', sa.String(), nullable=True))
|
||||||
|
op.add_column('task_event', sa.Column('mi_count', sa.Integer(), nullable=True))
|
||||||
|
op.add_column('task_event', sa.Column('mi_index', sa.Integer(), nullable=True))
|
||||||
|
op.add_column('task_event', sa.Column('mi_type', sa.String(), nullable=True))
|
||||||
|
op.add_column('task_event', sa.Column('process_name', sa.String(), nullable=True))
|
||||||
|
op.add_column('task_event', sa.Column('task_name', sa.String(), nullable=True))
|
||||||
|
op.add_column('task_event', sa.Column('task_title', sa.String(), nullable=True))
|
||||||
|
op.add_column('task_event', sa.Column('task_type', sa.String(), nullable=True))
|
||||||
|
op.add_column('workflow', sa.Column('last_updated', sa.DateTime(), nullable=True))
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('workflow', 'last_updated')
|
||||||
|
op.drop_column('task_event', 'task_type')
|
||||||
|
op.drop_column('task_event', 'task_title')
|
||||||
|
op.drop_column('task_event', 'task_name')
|
||||||
|
op.drop_column('task_event', 'process_name')
|
||||||
|
op.drop_column('task_event', 'mi_type')
|
||||||
|
op.drop_column('task_event', 'mi_index')
|
||||||
|
op.drop_column('task_event', 'mi_count')
|
||||||
|
op.drop_column('task_event', 'action')
|
||||||
|
op.create_table('workflow_stats',
|
||||||
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
||||||
|
sa.Column('study_id', sa.INTEGER(), autoincrement=False, nullable=False),
|
||||||
|
sa.Column('workflow_id', sa.INTEGER(), autoincrement=False, nullable=False),
|
||||||
|
sa.Column('workflow_spec_id', sa.VARCHAR(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('spec_version', sa.VARCHAR(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('num_tasks_total', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('num_tasks_complete', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('num_tasks_incomplete', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('last_updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['study_id'], ['study.id'], name='workflow_stats_study_id_fkey'),
|
||||||
|
sa.ForeignKeyConstraint(['workflow_id'], ['workflow.id'], name='workflow_stats_workflow_id_fkey'),
|
||||||
|
sa.ForeignKeyConstraint(['workflow_spec_id'], ['workflow_spec.id'], name='workflow_stats_workflow_spec_id_fkey'),
|
||||||
|
sa.PrimaryKeyConstraint('id', name='workflow_stats_pkey')
|
||||||
|
)
|
||||||
|
# ### end Alembic commands ###
|
|
@ -392,9 +392,9 @@ class TestWorkflowProcessor(BaseTest):
|
||||||
self.assertTrue("enter_core_info" in data)
|
self.assertTrue("enter_core_info" in data)
|
||||||
self.assertEqual("required", data["enter_core_info"])
|
self.assertEqual("required", data["enter_core_info"])
|
||||||
|
|
||||||
# It should mark the Data Security Plan as required, because InfoSec Approval (24) is included in required docs.
|
# It should mark Personnel as required, because StudyInfo.investigators is not empty.
|
||||||
# self.assertTrue("data_security_plan" in data)
|
self.assertTrue("personnel" in data)
|
||||||
# self.assertEqual("required", data["data_security_plan"])
|
self.assertEqual("required", data["personnel"])
|
||||||
|
|
||||||
# It should mark the sponsor funding source as disabled since the funding required (12) is not included in the required docs.
|
# It should mark the sponsor funding source as disabled since the funding required (12) is not included in the required docs.
|
||||||
self.assertTrue("sponsor_funding_source" in data)
|
self.assertTrue("sponsor_funding_source" in data)
|
||||||
|
|
Loading…
Reference in New Issue