Updates IND workflow spec. Fixes validation process to return lookups for enum values.

This commit is contained in:
Aaron Louie 2020-07-17 11:51:21 -04:00
parent 7cbafe966e
commit e82532aad8
9 changed files with 525 additions and 233 deletions

View File

@ -143,20 +143,37 @@ class WorkflowService(object):
@staticmethod
def get_random_data_for_field(field, task):
if field.type == "enum":
has_ldap_lookup = field.has_property(Task.PROP_LDAP_LOOKUP)
has_file_lookup = field.has_property(Task.PROP_OPTIONS_FILE_NAME)
has_data_lookup = field.has_property(Task.PROP_OPTIONS_DATA_NAME)
has_lookup = has_ldap_lookup or has_file_lookup or has_data_lookup
if field.type == "enum" and not has_lookup:
# If it's a normal enum field with no lookup,
# return a random option.
if len(field.options) > 0:
random_choice = random.choice(field.options)
if isinstance(random_choice, dict):
return random.choice(field.options)['id']
choice = random.choice(field.options)
return {
'value': choice['id'],
'label': choice['name']
}
else:
# fixme: why it is sometimes an EnumFormFieldOption, and other times not?
return random_choice.id ## Assume it is an EnumFormFieldOption
# Assume it is an EnumFormFieldOption
return {
'value': random_choice.id,
'label': random_choice.name
}
else:
raise ApiError.from_task("invalid_enum", "You specified an enumeration field (%s),"
" with no options" % field.id, task)
elif field.type == "autocomplete":
elif field.type == "autocomplete" or field.type == "enum":
# If it has a lookup, get the lookup model from the spreadsheet or task data, then return a random option
# from the lookup model
lookup_model = LookupService.get_lookup_model(task, field)
if field.has_property(Task.PROP_LDAP_LOOKUP): # All ldap records get the same person.
if has_ldap_lookup: # All ldap records get the same person.
return {
"label": "dhf8r",
"value": "Dan Funk",
@ -172,9 +189,7 @@ class WorkflowService(object):
elif lookup_model:
data = db.session.query(LookupDataModel).filter(
LookupDataModel.lookup_file_model == lookup_model).limit(10).all()
options = []
for d in data:
options.append({"id": d.value, "label": d.label})
options = [{"value": d.value, "label": d.label, "data": d.data} for d in data]
return random.choice(options)
else:
raise ApiError.from_task("unknown_lookup_option", "The settings for this auto complete field "

View File

@ -1,96 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" id="Definitions_0o0ff2r" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
<decision id="decision_ind_check" name="IND Check">
<decisionTable id="decisionTable_1">
<input id="input_1" label="IS_IND">
<inputExpression id="inputExpression_1" typeRef="integer">
<text>StudyInfo.details.IS_IND</text>
</inputExpression>
</input>
<input id="InputClause_1yk6kx1" label="IND_1 Number?">
<inputExpression id="LiteralExpression_00xhtjw" typeRef="string">
<text>StudyInfo.details.IND_1</text>
</inputExpression>
</input>
<input id="InputClause_069sith" label="IND_2 Number?">
<inputExpression id="LiteralExpression_1h9kd8o" typeRef="string">
<text>StudyInfo.details.IND_2</text>
</inputExpression>
</input>
<input id="InputClause_0d0vpur" label="IND_3 Number?">
<inputExpression id="LiteralExpression_0zbsg01" typeRef="string">
<text>StudyInfo.details.IND_3</text>
</inputExpression>
</input>
<output id="output_1" label="Add Supplemental Data" name="ind_supplement" typeRef="boolean" />
<rule id="DecisionRule_0h0od2e">
<inputEntry id="UnaryTests_09ctq71">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_1cub5pk">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_0aubvru">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0rjeqez">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_1we3duh">
<text>true</text>
</outputEntry>
</rule>
<rule id="DecisionRule_199dgpt">
<inputEntry id="UnaryTests_1ec0msc">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_0h3sj7g">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1ji4kgh">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_10gxrx9">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_1fhlpya">
<text>true</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0teanii">
<inputEntry id="UnaryTests_0akfjdp">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_1c88e2t">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0zfrdlt">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_07drghr">
<text>not('')</text>
</inputEntry>
<outputEntry id="LiteralExpression_1i7dtia">
<text>true</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0m9aydp">
<inputEntry id="UnaryTests_003n37j">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1fcaod2">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0hmnsvb">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0y6xian">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_1wuhxz7">
<text>false</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
</definitions>

View File

@ -1,127 +0,0 @@
<?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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1e7871f" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
<bpmn:process id="Process_04jm0bm" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_1dhb8f4</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_1dhb8f4" sourceRef="StartEvent_1" targetRef="ScriptTask_1fn00ox" />
<bpmn:endEvent id="EndEvent_1h89sl4">
<bpmn:incoming>SequenceFlow_1yhv1qz</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1enco3g</bpmn:incoming>
</bpmn:endEvent>
<bpmn:scriptTask id="ScriptTask_1fn00ox" name="Load IRB Details">
<bpmn:incoming>SequenceFlow_1dhb8f4</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1uzcl1f</bpmn:outgoing>
<bpmn:script>StudyInfo details</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_1uzcl1f" sourceRef="ScriptTask_1fn00ox" targetRef="Task_SupplementIDE" />
<bpmn:exclusiveGateway id="ExclusiveGateway_1fib89p">
<bpmn:incoming>SequenceFlow_1lazou8</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1yb1vma</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_011l5xt</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_1yb1vma" name="Yes" sourceRef="ExclusiveGateway_1fib89p" targetRef="UserTask_0a2dfa8">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">ind_supplement == True</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_011l5xt" name="No" sourceRef="ExclusiveGateway_1fib89p" targetRef="Task_NoIDE">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">ind_supplement == False</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:manualTask id="Task_NoIDE" name="IND But No Numbers">
<bpmn:documentation>The use of an Investigational New Drug (IND) was indicated in Protocol Builder, but no IND number was entered. Please enter up to three numbers in the Supplemental section of Protocol Builder so supplemental information can be entered here.</bpmn:documentation>
<bpmn:incoming>SequenceFlow_011l5xt</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1yhv1qz</bpmn:outgoing>
</bpmn:manualTask>
<bpmn:sequenceFlow id="SequenceFlow_1lazou8" sourceRef="Task_SupplementIDE" targetRef="ExclusiveGateway_1fib89p" />
<bpmn:businessRuleTask id="Task_SupplementIDE" name="Supplement IND?" camunda:decisionRef="decision_ind_check">
<bpmn:incoming>SequenceFlow_1uzcl1f</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1lazou8</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:sequenceFlow id="SequenceFlow_1yhv1qz" sourceRef="Task_NoIDE" targetRef="EndEvent_1h89sl4" />
<bpmn:userTask id="UserTask_0a2dfa8" name="Edit IND Info" camunda:formKey="FormKey_Details">
<bpmn:documentation>IND No.: {{StudyInfo.details.IND_1}}</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="HolderType" label="IND Holder Type" type="enum">
<camunda:value id="Industry" name="Industry" />
<camunda:value id="UVaPI" name="UVa PI" />
<camunda:value id="OtherPI" name="Other PI" />
<camunda:value id="UVaCenter" name="UVaCenter" />
<camunda:value id="OtherCollUniv" name="Other Colleges and Universities" />
<camunda:value id="Exempt" name="IND Exempt" />
<camunda:value id="NA" name="NA" />
</camunda:formField>
<camunda:formField id="HolderNameNotInList" label="IND Holder Name if not in above list" type="string" />
<camunda:formField id="DrugBiologicName" label="Drug/Biologic Name" type="string" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1yb1vma</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1enco3g</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="SequenceFlow_1enco3g" sourceRef="UserTask_0a2dfa8" targetRef="EndEvent_1h89sl4" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_04jm0bm">
<bpmndi:BPMNEdge id="SequenceFlow_1enco3g_di" bpmnElement="SequenceFlow_1enco3g">
<di:waypoint x="810" y="117" />
<di:waypoint x="932" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1yhv1qz_di" bpmnElement="SequenceFlow_1yhv1qz">
<di:waypoint x="810" y="230" />
<di:waypoint x="871" y="230" />
<di:waypoint x="871" y="117" />
<di:waypoint x="932" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1lazou8_di" bpmnElement="SequenceFlow_1lazou8">
<di:waypoint x="510" y="117" />
<di:waypoint x="585" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_011l5xt_di" bpmnElement="SequenceFlow_011l5xt">
<di:waypoint x="610" y="142" />
<di:waypoint x="610" y="230" />
<di:waypoint x="710" y="230" />
<bpmndi:BPMNLabel>
<dc:Bounds x="618" y="183" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1yb1vma_di" bpmnElement="SequenceFlow_1yb1vma">
<di:waypoint x="635" y="117" />
<di:waypoint x="710" y="117" />
<bpmndi:BPMNLabel>
<dc:Bounds x="659" y="99" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1uzcl1f_di" bpmnElement="SequenceFlow_1uzcl1f">
<di:waypoint x="360" y="117" />
<di:waypoint x="410" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dhb8f4_di" bpmnElement="SequenceFlow_1dhb8f4">
<di:waypoint x="188" y="117" />
<di:waypoint x="260" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="152" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1h89sl4_di" bpmnElement="EndEvent_1h89sl4">
<dc:Bounds x="932" y="99" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="414" y="202" width="74" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1fn00ox_di" bpmnElement="ScriptTask_1fn00ox">
<dc:Bounds x="260" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_1fib89p_di" bpmnElement="ExclusiveGateway_1fib89p" isMarkerVisible="true">
<dc:Bounds x="585" y="92" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ManualTask_1f7z9wm_di" bpmnElement="Task_NoIDE">
<dc:Bounds x="710" y="190" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BusinessRuleTask_1cszgkx_di" bpmnElement="Task_SupplementIDE">
<dc:Bounds x="410" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0a2dfa8_di" bpmnElement="UserTask_0a2dfa8">
<dc:Bounds x="710" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

Binary file not shown.

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" id="Definitions_0o0ff2r" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
<decision id="decision_ind_check" name="IND Check">
<decisionTable id="decisionTable_1">
<input id="input_1" label="IS_IND">
<inputExpression id="inputExpression_1" typeRef="integer">
<text>StudyInfo.details.IS_IND</text>
</inputExpression>
</input>
<input id="InputClause_1yk6kx1" label="IND_1 Number?">
<inputExpression id="LiteralExpression_00xhtjw" typeRef="string">
<text>StudyInfo.details.IND_1</text>
</inputExpression>
</input>
<input id="InputClause_069sith" label="IND_2 Number?">
<inputExpression id="LiteralExpression_1h9kd8o" typeRef="string">
<text>StudyInfo.details.IND_2</text>
</inputExpression>
</input>
<input id="InputClause_0d0vpur" label="IND_3 Number?">
<inputExpression id="LiteralExpression_0zbsg01" typeRef="string">
<text>StudyInfo.details.IND_3</text>
</inputExpression>
</input>
<output id="output_1" label="Add Supplemental Data" name="ind_supplement" typeRef="boolean" />
<output id="OutputClause_0cfn42v" label="IND Count Entered" name="ind_cnt" typeRef="string" />
<output id="OutputClause_0xcdkqm" label="IND Message" name="ind_message" typeRef="string" />
<output id="OutputClause_08qk83g" label="IND 1 Field Value" name="IND1_Number" typeRef="string" />
<rule id="DecisionRule_0teanii">
<description>3 IND #s</description>
<inputEntry id="UnaryTests_0akfjdp">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_1c88e2t">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_0zfrdlt">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_07drghr">
<text>not('')</text>
</inputEntry>
<outputEntry id="LiteralExpression_1i7dtia">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_0kulwlr">
<text>"three"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1tw8tzn">
<text>"Three IND #s entered"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1fiijih">
<text></text>
</outputEntry>
</rule>
<rule id="DecisionRule_199dgpt">
<description>2 IND #s</description>
<inputEntry id="UnaryTests_1ec0msc">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_0h3sj7g">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_1ji4kgh">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_10gxrx9">
<text>""</text>
</inputEntry>
<outputEntry id="LiteralExpression_1fhlpya">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_1h5mox1">
<text>"two"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1nvcjhv">
<text>"Two IND #s entered"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1rwd1ja">
<text></text>
</outputEntry>
</rule>
<rule id="DecisionRule_0z0tcm0">
<description>3 IND#s, missing #2</description>
<inputEntry id="UnaryTests_1kf86r3">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_0jm1wzq">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_14itgac">
<text>""</text>
</inputEntry>
<inputEntry id="UnaryTests_1prht5p">
<text>not('')</text>
</inputEntry>
<outputEntry id="LiteralExpression_0pooubu">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_0nioovi">
<text>"two"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1fa5e2o">
<text>"Two IND #s entered"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1qul3vr">
<text></text>
</outputEntry>
</rule>
<rule id="DecisionRule_0bwkqh7">
<description>3 IND#s, missing #1</description>
<inputEntry id="UnaryTests_13ig4fh">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_11kb6cw">
<text>""</text>
</inputEntry>
<inputEntry id="UnaryTests_0sfwtwo">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_0xxmh5j">
<text>not('')</text>
</inputEntry>
<outputEntry id="LiteralExpression_14otjle">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_13qodmm">
<text>"two"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0xhjgjn">
<text>"Two IND #s entered"</text>
</outputEntry>
<outputEntry id="LiteralExpression_13g0u0n">
<text></text>
</outputEntry>
</rule>
<rule id="DecisionRule_0h0od2e">
<description>1 IND #</description>
<inputEntry id="UnaryTests_09ctq71">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_1cub5pk">
<text>not('')</text>
</inputEntry>
<inputEntry id="UnaryTests_0aubvru">
<text>""</text>
</inputEntry>
<inputEntry id="UnaryTests_0rjeqez">
<text>""</text>
</inputEntry>
<outputEntry id="LiteralExpression_1we3duh">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_1jv0san">
<text>"one"</text>
</outputEntry>
<outputEntry id="LiteralExpression_19cvvhd">
<text>"One IND # entered"</text>
</outputEntry>
<outputEntry id="LiteralExpression_15ikz7u">
<text>StudyInfo.details.IND_1</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1nitohs">
<description>No</description>
<inputEntry id="UnaryTests_19oot48">
<text>1</text>
</inputEntry>
<inputEntry id="UnaryTests_0i2qyga">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_09wye05">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1g4y2ti">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_0c2mi3l">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_1e2kzvw">
<text>"na"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0wj4zzb">
<text>"No IND Numbers Entered in PB"</text>
</outputEntry>
<outputEntry id="LiteralExpression_049iioi">
<text>""</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0m9aydp">
<description>No IND, PB Q#56 answered as No, should not be needed, but here as stopgap in case memu check failed</description>
<inputEntry id="UnaryTests_003n37j">
<text>0</text>
</inputEntry>
<inputEntry id="UnaryTests_1fcaod2">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0hmnsvb">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0y6xian">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_1wuhxz7">
<text>false</text>
</outputEntry>
<outputEntry id="LiteralExpression_1dznftw">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_1lbt5oy">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_0tkt63s">
<text></text>
</outputEntry>
</rule>
</decisionTable>
</decision>
</definitions>

View File

@ -0,0 +1,276 @@
<?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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1e7871f" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.0.0">
<bpmn:process id="Process_04jm0bm" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_1dhb8f4</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_1dhb8f4" sourceRef="StartEvent_1" targetRef="ScriptTask_LoadIRBDetails" />
<bpmn:endEvent id="EndEvent_1h89sl4">
<bpmn:incoming>Flow_0jqdolk</bpmn:incoming>
<bpmn:incoming>Flow_OneOnly</bpmn:incoming>
</bpmn:endEvent>
<bpmn:scriptTask id="ScriptTask_LoadIRBDetails" name="Load IRB Details">
<bpmn:incoming>SequenceFlow_1dhb8f4</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1uzcl1f</bpmn:outgoing>
<bpmn:script>StudyInfo details</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_1uzcl1f" sourceRef="ScriptTask_LoadIRBDetails" targetRef="Task_SupplementIDE" />
<bpmn:businessRuleTask id="Task_SupplementIDE" name="Current IND Status" camunda:decisionRef="decision_ind_check">
<bpmn:incoming>SequenceFlow_1uzcl1f</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1cwibmt</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:userTask id="IND_n1_info" name="Edit IND #1 Info" camunda:formKey="IND1_Info">
<bpmn:documentation>IND No.: {{ StudyInfo.details.IND_1 }}</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="IND1_Number" label="IND1 number:" type="string">
<camunda:properties>
<camunda:property id="description" value="Enter IND number, if available." />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND1_HolderType" label="IND Holder Type" type="enum">
<camunda:value id="Industry" name="Industry" />
<camunda:value id="UVaPI" name="UVa PI" />
<camunda:value id="OtherPI" name="Other PI" />
<camunda:value id="UVaCenter" name="UVaCenter" />
<camunda:value id="OtherCollUniv" name="Other Colleges and Universities" />
<camunda:value id="Exempt" name="IND Exempt" />
<camunda:value id="NA" name="NA" />
</camunda:formField>
<camunda:formField id="IND1_HolderName" label="Holder Name" type="autocomplete">
<camunda:properties>
<camunda:property id="spreadsheet.name" value="SponsorList.xls" />
<camunda:property id="spreadsheet.value.column" value="CUSTOMER_NUMBER" />
<camunda:property id="spreadsheet.label.column" value="CUSTOMER_NAME" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND1_HolderNameNotInList" label="IND Holder Name if not in above list" type="string">
<camunda:properties>
<camunda:property id="hide_expression" value="model.IND1_HolderName &#38;&#38; model.IND1_HolderName.value !== &#34;0&#34;" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND1_DrugBiologicName" label="Drug/Biologic Name" type="string" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1bn0jp7</bpmn:incoming>
<bpmn:outgoing>Flow_10rb7gb</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="IND_n2_info" name="Edit IND #2 Info" camunda:formKey="IND2_Info">
<bpmn:documentation>IND No.:</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="IND2_Status" label="Do you have a second Investigational New Drug?" type="enum">
<camunda:value id="Yes" name="Yes" />
<camunda:value id="YesBut" name="Yes, but number is not available at this time" />
<camunda:value id="No" name="No" />
</camunda:formField>
<camunda:formField id="IND2_Number" label="IND2 Number:" type="string">
<camunda:properties>
<camunda:property id="value_expression" value="model.StudyInfo.details.IND_2" />
<camunda:property id="hide_expression" value="!model.IND2_Status || !model.IND2_Status.value || model.IND2_Status.value === &#39;No&#39;" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND2_HolderType" label="IND Holder Type" type="enum">
<camunda:properties>
<camunda:property id="hide_expression" value="!model.IND2_Status || !model.IND2_Status.value || model.IND2_Status.value === &#39;No&#39;" />
</camunda:properties>
<camunda:value id="Industry" name="Industry" />
<camunda:value id="UVaPI" name="UVa PI" />
<camunda:value id="OtherPI" name="Other PI" />
<camunda:value id="UVaCenter" name="UVaCenter" />
<camunda:value id="OtherCollUniv" name="Other Colleges and Universities" />
<camunda:value id="Exempt" name="IND Exempt" />
<camunda:value id="NA" name="NA" />
</camunda:formField>
<camunda:formField id="IND2_HolderName" label="Holder Name" type="autocomplete">
<camunda:properties>
<camunda:property id="spreadsheet.name" value="SponsorList.xls" />
<camunda:property id="spreadsheet.value.column" value="CUSTOMER_NUMBER" />
<camunda:property id="spreadsheet.label.column" value="CUSTOMER_NAME" />
<camunda:property id="hide_expression" value="!model.IND2_Status || !model.IND2_Status.value || model.IND2_Status.value === &#39;No&#39;" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND2_HolderNameNotInList" label="IND Holder Name if not in above list" type="string">
<camunda:properties>
<camunda:property id="hide_expression" value="!model.IND2_Status || !model.IND2_Status.value || model.IND2_Status.value === &#39;No&#39; || model.IND2_HolderName.value !== &#34;0&#34;" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND2_DrugBiologicName" label="Drug/Biologic Name" type="string">
<camunda:properties>
<camunda:property id="hide_expression" value="!model.IND2_Status || !model.IND2_Status.value || model.IND2_Status.value === &#39;No&#39;" />
</camunda:properties>
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>Flow_TwoOrThree</bpmn:incoming>
<bpmn:outgoing>Flow_1p563xr</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="IND_n3_info" name="Edit IND #3 Info" camunda:formKey="IND3_Info">
<bpmn:documentation>IND No.:</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="IND3_Status" label="Do you have a third Investigational New Drug?" type="enum" defaultValue="No">
<camunda:value id="Yes" name="Yes" />
<camunda:value id="YesBut" name="Yes, but number is not available at this time." />
<camunda:value id="No" name="No" />
</camunda:formField>
<camunda:formField id="IND3_Number" label="IND3 Number:" type="string">
<camunda:properties>
<camunda:property id="value_expression" value="model.StudyInfo.details.IND_3" />
<camunda:property id="hide_expression" value="!model.IND3_Status || !model.IND3_Status.value || model.IND3_Status.value === &#39;No&#39;" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND3_HolderType" label="IND Holder Type" type="enum">
<camunda:properties>
<camunda:property id="hide_expression" value="!model.IND3_Status || !model.IND3_Status.value || model.IND3_Status.value === &#39;No&#39;" />
</camunda:properties>
<camunda:value id="Industry" name="Industry" />
<camunda:value id="UVaPI" name="UVa PI" />
<camunda:value id="OtherPI" name="Other PI" />
<camunda:value id="UVaCenter" name="UVaCenter" />
<camunda:value id="OtherCollUniv" name="Other Colleges and Universities" />
<camunda:value id="Exempt" name="IND Exempt" />
<camunda:value id="NA" name="NA" />
</camunda:formField>
<camunda:formField id="IND3_HolderName" label="Holder Name" type="autocomplete">
<camunda:properties>
<camunda:property id="spreadsheet.name" value="SponsorList.xls" />
<camunda:property id="spreadsheet.value.column" value="CUSTOMER_NUMBER" />
<camunda:property id="spreadsheet.label.column" value="CUSTOMER_NAME" />
<camunda:property id="hide_expression" value="!model.IND3_Status || !model.IND3_Status.value || model.IND3_Status.value === &#39;No&#39;" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND3_HolderNameNotInList" label="IND Holder Name if not in above list" type="string">
<camunda:properties>
<camunda:property id="hide_expression" value="!model.IND3_Status || !model.IND3_Status.value || model.IND3_Status.value === &#39;No&#39; || model.IND3_HolderName.value !== &#34;0&#34;" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="IND3_DrugBiologicName" label="Drug/Biologic Name" type="string">
<camunda:properties>
<camunda:property id="hide_expression" value="!model.IND3_Status || !model.IND3_Status.value || model.IND3_Status.value === &#39;No&#39;" />
</camunda:properties>
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1p563xr</bpmn:incoming>
<bpmn:outgoing>Flow_0jqdolk</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="SequenceFlow_1cwibmt" sourceRef="Task_SupplementIDE" targetRef="Activity_0yf2ypo" />
<bpmn:userTask id="Activity_0yf2ypo" name="Provide IND Count" camunda:formKey="IND_Count">
<bpmn:documentation>{{ ind_message }}</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="IND_CntEntered" label="How Many?" type="enum" defaultValue="one">
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
<camunda:value id="value_one" name="1 IND number" />
<camunda:value id="value_two" name="2 IND number" />
<camunda:value id="value_three" name="3 IND number" />
<camunda:value id="value_na" name="No IND Numbers in PB" />
</camunda:formField>
<camunda:formField id="FormField_0h8vmid" label="Test" type="string">
<camunda:properties>
<camunda:property id="value_expression" value="model.ind_cnt" />
</camunda:properties>
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1cwibmt</bpmn:incoming>
<bpmn:outgoing>Flow_1bn0jp7</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_1bn0jp7" sourceRef="Activity_0yf2ypo" targetRef="IND_n1_info" />
<bpmn:sequenceFlow id="Flow_1p563xr" sourceRef="IND_n2_info" targetRef="IND_n3_info" />
<bpmn:sequenceFlow id="Flow_0jqdolk" sourceRef="IND_n3_info" targetRef="EndEvent_1h89sl4" />
<bpmn:sequenceFlow id="Flow_10rb7gb" sourceRef="IND_n1_info" targetRef="Gateway_0ckycp9" />
<bpmn:exclusiveGateway id="Gateway_0ckycp9">
<bpmn:incoming>Flow_10rb7gb</bpmn:incoming>
<bpmn:outgoing>Flow_TwoOrThree</bpmn:outgoing>
<bpmn:outgoing>Flow_OneOnly</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_TwoOrThree" name="Two or Three INDs" sourceRef="Gateway_0ckycp9" targetRef="IND_n2_info">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">IND_CntEntered != "value_one"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_OneOnly" name="One IND" sourceRef="Gateway_0ckycp9" targetRef="EndEvent_1h89sl4">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">IND_CntEntered == "value_one"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_04jm0bm">
<bpmndi:BPMNEdge id="Flow_00n2n7p_di" bpmnElement="Flow_OneOnly">
<di:waypoint x="940" y="142" />
<di:waypoint x="940" y="260" />
<di:waypoint x="1510" y="260" />
<di:waypoint x="1510" y="135" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1205" y="242" width="43" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1o2u7k3_di" bpmnElement="Flow_TwoOrThree">
<di:waypoint x="965" y="117" />
<di:waypoint x="1070" y="117" />
<bpmndi:BPMNLabel>
<dc:Bounds x="987" y="86" width="65" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_10rb7gb_di" bpmnElement="Flow_10rb7gb">
<di:waypoint x="860" y="117" />
<di:waypoint x="915" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0jqdolk_di" bpmnElement="Flow_0jqdolk">
<di:waypoint x="1380" y="117" />
<di:waypoint x="1492" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1p563xr_di" bpmnElement="Flow_1p563xr">
<di:waypoint x="1170" y="117" />
<di:waypoint x="1280" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1bn0jp7_di" bpmnElement="Flow_1bn0jp7">
<di:waypoint x="670" y="117" />
<di:waypoint x="760" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1cwibmt_di" bpmnElement="SequenceFlow_1cwibmt">
<di:waypoint x="520" y="117" />
<di:waypoint x="570" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1uzcl1f_di" bpmnElement="SequenceFlow_1uzcl1f">
<di:waypoint x="340" y="117" />
<di:waypoint x="420" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dhb8f4_di" bpmnElement="SequenceFlow_1dhb8f4">
<di:waypoint x="188" y="117" />
<di:waypoint x="240" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="152" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1h89sl4_di" bpmnElement="EndEvent_1h89sl4">
<dc:Bounds x="1492" y="99" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="414" y="202" width="74" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1fn00ox_di" bpmnElement="ScriptTask_LoadIRBDetails">
<dc:Bounds x="240" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BusinessRuleTask_1cszgkx_di" bpmnElement="Task_SupplementIDE">
<dc:Bounds x="420" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0a2dfa8_di" bpmnElement="IND_n1_info">
<dc:Bounds x="760" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1smni98_di" bpmnElement="IND_n2_info">
<dc:Bounds x="1070" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1378hd8_di" bpmnElement="IND_n3_info">
<dc:Bounds x="1280" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0wfey2b_di" bpmnElement="Activity_0yf2ypo">
<dc:Bounds x="570" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0ckycp9_di" bpmnElement="Gateway_0ckycp9" isMarkerVisible="true">
<dc:Bounds x="915" y="92" width="50" height="50" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

View File

@ -93,8 +93,8 @@ class ExampleDataLoader:
description="Supplemental information for the IDE number entered in Protocol Builder",
category_id=0,
display_order=3)
self.create_spec(id="ind_supplement",
name="ind_supplement",
self.create_spec(id="ind_update",
name="ind_update",
display_name="IND Supplement Info",
description="Supplement information for the Investigational New Drug(s) specified in Protocol Builder",
category_id=0,

View File

@ -1,4 +1,5 @@
import json
import unittest
from tests.base_test import BaseTest
@ -88,6 +89,7 @@ class TestWorkflowService(BaseTest):
WorkflowService.populate_form_with_random_data(task, task_api, required_only=False)
self.assertTrue(isinstance(task.data["sponsor"], dict))
@unittest.skip("RRT no longer needs to be supported")
def test_fix_legacy_data_model_for_rrt(self):
ExampleDataLoader().load_rrt() # Make sure the research_rampup is loaded, as it's not a test spec.
workflow = self.create_workflow('research_rampup')

View File

@ -1,4 +1,5 @@
import json
import unittest
from unittest.mock import patch
from tests.base_test import BaseTest
@ -51,6 +52,7 @@ class TestWorkflowSpecValidation(BaseTest):
app.config['PB_ENABLED'] = True
self.validate_all_loaded_workflows()
@unittest.skip("RRT no longer needs to be supported")
def test_successful_validation_of_rrt_workflows(self):
self.load_example_data(use_rrt_data=True)
self.validate_all_loaded_workflows()