Merge remote-tracking branch 'origin/master' into feature/pb_services

This commit is contained in:
Dan Funk 2020-03-05 17:13:41 -05:00
commit 9fcd6f38f4
10 changed files with 254 additions and 335 deletions

View File

@ -746,7 +746,7 @@ components:
example: "2019-12-25T09:12:33.001Z"
protocol_builder_status:
type: string
enum: [out_of_date, in_process, complete, updating]
enum: [DRAFT, IN_PROCESS, IN_REVIEW, REVIEW_COMPLETE, INACTIVE]
example: done
user_uid:
type: string

View File

@ -89,7 +89,13 @@ def update_from_protocol_builder():
# Mark studies as inactive that are no longer in Protocol Builder
for study_id in db_study_ids:
if study_id not in pb_study_ids:
update_study(study_id=study_id, body={'inactive': True})
update_study(
study_id=study_id,
body={
'inactive': True,
'protocol_builder_status': ProtocolBuilderStatus.INACTIVE.name
}
)
# Return updated studies
updated_studies = session.query(StudyModel).filter_by(user_uid=user.uid).all()
@ -158,10 +164,20 @@ def map_pb_study_to_study(pb_study):
if k in prop_map:
study_info[prop_map[k]] = v
if pb_study['Q_COMPLETE']:
study_info['protocol_builder_status'] = ProtocolBuilderStatus.complete._value_
else:
study_info['protocol_builder_status'] = ProtocolBuilderStatus.in_process._value_
# Translate Protocol Builder states to enum values
status = ProtocolBuilderStatus.DRAFT
pb_details = ProtocolBuilderService.get_study_details(pb_study['STUDYID'])
if 'Q_COMPLETE' in pb_study and pb_study['Q_COMPLETE']:
if 'UPLOAD_COMPLETE' in pb_details and pb_details['UPLOAD_COMPLETE']:
if 'HSRNUMBER' in pb_study and pb_study['HSRNUMBER']:
status = ProtocolBuilderStatus.REVIEW_COMPLETE
else:
status = ProtocolBuilderStatus.IN_REVIEW
else:
status = ProtocolBuilderStatus.IN_PROCESS
study_info['protocol_builder_status'] = status.name
study_info['inactive'] = False
return study_info

View File

@ -18,10 +18,11 @@ class ProtocolBuilderInvestigatorType(enum.Enum):
class ProtocolBuilderStatus(enum.Enum):
out_of_date = "out_of_date"
in_process = "in_process"
complete = "complete"
updating = "updating"
DRAFT = 'draft', # !Q_COMPLETE
IN_PROCESS = 'in_process', # Q_COMPLETE && !UPLOAD_COMPLETE && !HSRNUMBER
IN_REVIEW = 'in_review', # Q_COMPLETE && (!UPLOAD_COMPLETE || !HSRNUMBER)
REVIEW_COMPLETE = 'review_complete', # Q_COMPLETE && UPLOAD_COMPLETE && HSRNUMBER
INACTIVE = 'inactive', # Not found in PB
class ProtocolBuilderStudy(object):

View File

@ -98,7 +98,7 @@
<camunda:properties>
<camunda:property id="enum_type" value="checkbox" />
</camunda:properties>
<camunda:value id="ResearchNoHIPPAIds" name="Research data emailed to UVa personnel, but with no HIPAA identifiers except dates." />
<camunda:value id="ResearchNoHIPPAIds" name="Research data emailed to UVA personnel, but with no HIPAA identifiers except dates." />
<camunda:value id="EmailUVa" name="Email only to and from UVA personnel with *HS in the Global Address List" />
</camunda:formField>
<camunda:formField id="CollStorUVaLocEmailOther" label="Other Email Characteristics (Please describe)" type="textarea" />
@ -484,78 +484,49 @@ Indicate all the possible formats in which you will transmit your data outside o
<bpmn:incoming>SequenceFlow_08rwbhm</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0uewki3</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0lere0k</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_14p4mbl</bpmn:outgoing>
<bpmn:outgoing>Flow_1h5ufzp</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:sequenceFlow id="SequenceFlow_0uewki3" sourceRef="Task_EnterEmailMethods" targetRef="ExclusiveGateway_1lpm3pa" />
<bpmn:sequenceFlow id="SequenceFlow_0lere0k" sourceRef="Task_EnterTransmissionMethod" targetRef="ExclusiveGateway_1lpm3pa" />
<bpmn:sequenceFlow id="SequenceFlow_14p4mbl" sourceRef="ExclusiveGateway_1lpm3pa" targetRef="Task_EnterDSPTeamNotes" />
<bpmn:userTask id="Task_EnterTransmissionMethod" name="Enter Transmission Method" camunda:formKey="EnterTransmissionMethod">
<bpmn:documentation>Transmission Method of data that will be mailed or faxed (FedEx, UPS, certified mail, etc.) Check all that apply:</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="DataTransmissionMethodPaper" label="Paper documents will be shipped using trackable method." type="enum">
<camunda:formField id="DataTransmissionMethodPaper" label="Paper documents" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="checkbox" />
<camunda:property id="markdown_description" value="**Note:** Paper documents shipped using not trackable method - Not Allowed." />
<camunda:property id="enum_type" value="radio" />
<camunda:property id="markdown_description" value="**Note:** Paper documents shipped using non-trackable method - **Not Allowed.**" />
</camunda:properties>
<camunda:value id="Yes" name="Yes" />
<camunda:value id="NA" name="NA, paper documents will not be shipped" />
<camunda:value id="Yes" name="Yes, paper documents will be shipped using trackable method" />
<camunda:value id="No" name="No, paper documents will not be shipped" />
</camunda:formField>
<camunda:formField id="DataTransmissionMethodEncrypted" label="Data encrypted on an individual use device and shipped using trackable method. Password to the encrypted data transmitted separately." type="enum">
<camunda:formField id="DataTransmissionMethodEncrypted" label="Individual Use Devices" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="checkbox" />
<camunda:property id="markdown_description" value="**Note:** Examples of individual use devices: CD, thumb drive, etc." />
</camunda:properties>
<camunda:value id="Yes" name="Yes" />
<camunda:value id="NA" name="NA, data will not be shipped on an individual use device" />
<camunda:value id="Yes" name="Yes, individual use devices will be shipped using a trackable method with data encrypted and password to the encrypted data transmitted separately" />
<camunda:value id="No" name="No, individual use devices will not be shipped" />
</camunda:formField>
<camunda:formField id="DataTransmissionMethodFaxed" label="Data faxed to a receiving machine in a restricted-access location. The intended recipient is clearly indicated, alerted to the pending transmission and available to pick up immediately." type="enum">
<camunda:formField id="DataTransmissionMethodFaxed" label="Faxed" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="checkbox" />
<camunda:property id="markdown_description" value="**Note:** By checking this option, you are also confirming you will verify FAX numbers before faxing and use FAX cover sheet with a confidentiality statement." />
</camunda:properties>
<camunda:value id="Yes" name="Yes" />
<camunda:value id="NA" name="NA, data will not be faxed" />
<camunda:value id="Yes" name="Yes, data wile be faxed to a receiving machine in a restricted-access location with the intended recipient is clearly indicated, alerted to the pending transmission and available to pick up immediately." />
<camunda:value id="No" name="No, data will not be faxed" />
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1mnmo6p</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0lere0k</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_EnterDSPTeamNotes" name="Enter DSP Team Notes" camunda:formKey="EnterTeamNotes">
<bpmn:documentation>Data Security Plan Study Team Notes</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="TeamNotesType" label="DSP Note Type:" type="enum">
<camunda:properties>
<camunda:property id="group" value="TeamNotes" />
<camunda:property id="repeat" value="TeamNotes" />
</camunda:properties>
<camunda:value id="nitial" name="Initial DSP Submission Notes" />
<camunda:value id="RevPre" name="DSP Revisions - Pre-Study Initial IRB Approval" />
<camunda:value id="RevPost" name="DSP Revisions - Post-Study IRB Approval" />
</camunda:formField>
<camunda:formField id="TeamNotes" label="DSP Study Team Notes:" type="textarea">
<camunda:properties>
<camunda:property id="group" value="TeamNotes" />
<camunda:property id="repeat" value="TeamNotes" />
</camunda:properties>
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_14p4mbl</bpmn:incoming>
<bpmn:incoming>SequenceFlow_18ik6tv</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_02pq2w4</bpmn:outgoing>
<bpmn:standardLoopCharacteristics />
</bpmn:userTask>
<bpmn:endEvent id="EndEvent_151cj59">
<bpmn:incoming>Flow_0bvraie</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_02pq2w4" sourceRef="Task_EnterDSPTeamNotes" targetRef="Task_Create_DSP" />
<bpmn:exclusiveGateway id="ExclusiveGateway_0pi0c2d" name="Outside of UVa?">
<bpmn:incoming>SequenceFlow_0mgwas4</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_01hl869</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_18ik6tv</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_01hl869" name="Yes" sourceRef="ExclusiveGateway_0pi0c2d" targetRef="ExclusiveGateway_0x3t2vl">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">DateTransmittedOutside == True</bpmn:conditionExpression>
@ -566,9 +537,6 @@ Indicate all the possible formats in which you will transmit your data outside o
<bpmn:outgoing>SequenceFlow_12bv2i4</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1mnmo6p</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:sequenceFlow id="SequenceFlow_18ik6tv" name="No" sourceRef="ExclusiveGateway_0pi0c2d" targetRef="Task_EnterDSPTeamNotes">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">DateTransmittedOutside == False</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_100w7co" sourceRef="StartEvent_1co48s3" targetRef="Task_0q6ir2l" />
<bpmn:userTask id="Task_196zozc" name="View Definitions &#38; Instructions" camunda:formKey="def_temp_ack">
<bpmn:documentation>#### Collection &amp; storage of research data at UVA
@ -650,8 +618,8 @@ Submit the step only when you are ready. After you "Submit" the step, the inform
<camunda:formField id="FormField_isCreateDSP" label="Create DSP?" type="boolean" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_02pq2w4</bpmn:incoming>
<bpmn:incoming>Flow_1wgcnrc</bpmn:incoming>
<bpmn:incoming>Flow_1h5ufzp</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1wzlqa1</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="ExclusiveGateway_1ef1ype">
@ -693,6 +661,7 @@ Submit the step only when you are ready. After you "Submit" the step, the inform
<bpmn:sequenceFlow id="Flow_1wgcnrc" name="No" sourceRef="Gateway_1yxsvlc" targetRef="Task_Create_DSP">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">FormField_DSP_Done == False</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1h5ufzp" sourceRef="ExclusiveGateway_1lpm3pa" targetRef="Task_Create_DSP" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_19ej1y2">
@ -841,23 +810,12 @@ Submit the step only when you are ready. After you "Submit" the step, the inform
<di:waypoint x="1710" y="530" />
<di:waypoint x="1710" y="415" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_14p4mbl_di" bpmnElement="SequenceFlow_14p4mbl">
<di:waypoint x="1735" y="390" />
<di:waypoint x="1810" y="390" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="UserTask_0ns9m8t_di" bpmnElement="Task_EnterTransmissionMethod">
<dc:Bounds x="1510" y="490" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1s134j8_di" bpmnElement="Task_EnterDSPTeamNotes">
<dc:Bounds x="1810" y="350" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_151cj59_di" bpmnElement="EndEvent_151cj59">
<dc:Bounds x="2742" y="372" width="36" height="36" />
<dc:Bounds x="2573" y="372" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_02pq2w4_di" bpmnElement="SequenceFlow_02pq2w4">
<di:waypoint x="1910" y="390" />
<di:waypoint x="1959" y="390" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_0pi0c2d_di" bpmnElement="ExclusiveGateway_0pi0c2d" isMarkerVisible="true">
<dc:Bounds x="1255" y="365" width="50" height="50" />
<bpmndi:BPMNLabel>
@ -874,15 +832,6 @@ Submit the step only when you are ready. After you "Submit" the step, the inform
<bpmndi:BPMNShape id="ParallelGateway_1284xgu_di" bpmnElement="ExclusiveGateway_0x3t2vl">
<dc:Bounds x="1385" y="365" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_18ik6tv_di" bpmnElement="SequenceFlow_18ik6tv">
<di:waypoint x="1280" y="415" />
<di:waypoint x="1280" y="610" />
<di:waypoint x="1860" y="610" />
<di:waypoint x="1860" y="430" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1563" y="592" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_100w7co_di" bpmnElement="SequenceFlow_100w7co">
<di:waypoint x="-149" y="390" />
<di:waypoint x="-89" y="390" />
@ -913,64 +862,68 @@ Submit the step only when you are ready. After you "Submit" the step, the inform
<dc:Bounds x="58" y="350" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1wzlqa1_di" bpmnElement="SequenceFlow_1wzlqa1">
<di:waypoint x="2059" y="390" />
<di:waypoint x="2127" y="390" />
<di:waypoint x="1890" y="390" />
<di:waypoint x="1958" y="390" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="UserTask_19v750c_di" bpmnElement="Task_Create_DSP">
<dc:Bounds x="1959" y="350" width="100" height="80" />
<dc:Bounds x="1790" y="350" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_1ef1ype_di" bpmnElement="ExclusiveGateway_1ef1ype" isMarkerVisible="true">
<dc:Bounds x="2127" y="365" width="50" height="50" />
<dc:Bounds x="1958" y="365" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_07rwety_di" bpmnElement="SequenceFlow_07rwety">
<di:waypoint x="2177" y="390" />
<di:waypoint x="2254" y="390" />
<di:waypoint x="2008" y="390" />
<di:waypoint x="2085" y="390" />
<bpmndi:BPMNLabel>
<dc:Bounds x="2207" y="372" width="18" height="14" />
<dc:Bounds x="2038" y="372" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0v51xcx_di" bpmnElement="SequenceFlow_0v51xcx">
<di:waypoint x="2354" y="390" />
<di:waypoint x="2430" y="390" />
<di:waypoint x="2185" y="390" />
<di:waypoint x="2261" y="390" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0c4dq75_di" bpmnElement="Task_0q2zf9x">
<dc:Bounds x="2254" y="350" width="100" height="80" />
<dc:Bounds x="2085" y="350" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1huif01_di" bpmnElement="SequenceFlow_1huif01">
<di:waypoint x="2152" y="415" />
<di:waypoint x="2152" y="513" />
<di:waypoint x="2480" y="513" />
<di:waypoint x="2480" y="430" />
<di:waypoint x="1983" y="415" />
<di:waypoint x="1983" y="513" />
<di:waypoint x="2311" y="513" />
<di:waypoint x="2311" y="430" />
<bpmndi:BPMNLabel>
<dc:Bounds x="2309" y="495" width="15" height="14" />
<dc:Bounds x="2140" y="495" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0gejicg_di" bpmnElement="Flow_0gejicg">
<di:waypoint x="2530" y="390" />
<di:waypoint x="2595" y="390" />
<di:waypoint x="2361" y="390" />
<di:waypoint x="2426" y="390" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Activity_0y3cxu2_di" bpmnElement="Activity_0kxjyy1">
<dc:Bounds x="2430" y="350" width="100" height="80" />
<dc:Bounds x="2261" y="350" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1yxsvlc_di" bpmnElement="Gateway_1yxsvlc" isMarkerVisible="true">
<dc:Bounds x="2595" y="365" width="50" height="50" />
<dc:Bounds x="2426" y="365" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0bvraie_di" bpmnElement="Flow_0bvraie">
<di:waypoint x="2645" y="390" />
<di:waypoint x="2742" y="390" />
<di:waypoint x="2476" y="390" />
<di:waypoint x="2573" y="390" />
<bpmndi:BPMNLabel>
<dc:Bounds x="2685" y="372" width="18" height="14" />
<dc:Bounds x="2516" y="372" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1wgcnrc_di" bpmnElement="Flow_1wgcnrc">
<di:waypoint x="2620" y="415" />
<di:waypoint x="2620" y="590" />
<di:waypoint x="2009" y="590" />
<di:waypoint x="2009" y="430" />
<di:waypoint x="2451" y="415" />
<di:waypoint x="2451" y="590" />
<di:waypoint x="1840" y="590" />
<di:waypoint x="1840" y="430" />
<bpmndi:BPMNLabel>
<dc:Bounds x="2308" y="572" width="15" height="14" />
<dc:Bounds x="2139" y="572" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1h5ufzp_di" bpmnElement="Flow_1h5ufzp">
<di:waypoint x="1735" y="390" />
<di:waypoint x="1790" y="390" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

View File

@ -14,6 +14,121 @@
<bpmn:sequenceFlow id="SequenceFlow_1bdgyx8" sourceRef="ParallelGateway_0x50y2p" targetRef="UserTask_0vmwq3j" />
<bpmn:sequenceFlow id="SequenceFlow_1vfbg50" sourceRef="UserTask_0vmwq3j" targetRef="ParallelGateway_0uesolv" />
<bpmn:sequenceFlow id="SequenceFlow_0skynyx" sourceRef="ParallelGateway_0uesolv" targetRef="EndEvent_0d4jix4" />
<bpmn:parallelGateway id="ParallelGateway_0x50y2p">
<bpmn:incoming>SequenceFlow_0xfv8yt</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1nyebxq</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0s6lscl</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0tl6dtl</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1bdgyx8</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:parallelGateway id="ParallelGateway_0uesolv">
<bpmn:incoming>SequenceFlow_0vnit5w</bpmn:incoming>
<bpmn:incoming>SequenceFlow_12u08ph</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1049qrj</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1vfbg50</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0skynyx</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:endEvent id="EndEvent_0d4jix4">
<bpmn:incoming>SequenceFlow_0skynyx</bpmn:incoming>
</bpmn:endEvent>
<bpmn:startEvent id="StartEvent_1k8r624">
<bpmn:outgoing>SequenceFlow_0xfv8yt</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:userTask id="UserTask_1ubwe2g" name="Enter Protocol Owner Info" camunda:formKey="FormKey_EnterProtocolOwnerInfo">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="FormField_ProtocolOwnerInfo" label="What is the Protocol Owner?" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="dropdown" />
<camunda:property id="description" value="The protocol owner name is always an entity. For example, if this is a UVA Primary Investigator - Investigator initiated study, the Protocol Owner Name will be &#34;University of Virginia&#34;" />
<camunda:property id="help" value="**The protocol owner name is always an entity.** For example, if this is a UVA Primary Investigator - Investigator initiated study, the Protocol Owner Name will be &#39;University of Virginia&#39;.\n\n### **How To:**\nYou can find the name by typing any part (at least 3 characters) of the name.\nNote: This source of this list is in the Integration System (Oracle) and the information is owned by and managed by the OSP team.\n**If you are not finding the name or need to make any changes:**\n1. Email &#39;Information Team listserve&#39; osp-infoteam@virginia.edu with the Subject Line &#34;Requesting New Sponsor Setup&#34; and provide the following information:\n - Sponsor Legal Name, Address, Sponsor Classification (Federal Government, Foreign Entity, Foundation, Industry, Local Government, Other Colleges &#38; Universities or State Government) as stated in the agreement/notification.\n - Copies of the agreement from the sponsor (contract, award letter, email, etc.).\n2. Once all the required information is received, OSP will add the name to the list.\n3. The updated list should be available for your selection in the workflow within 2 business days." />
</camunda:properties>
<camunda:value id="Ind" name="Industry" />
<camunda:value id="IntPI" name="UVA Primary Investigator - Investigator Initiated" />
<camunda:value id="OutPI" name="Outside Primary Investigator - Investigator Initiated" />
<camunda:value id="CoopGrp" name="Cooperative Group" />
<camunda:value id="OthColUni" name="Other Colleges and Universities" />
</camunda:formField>
<camunda:formField id="ProtocolOwnerName" label="Protocol Owner Name" type="string">
<camunda:properties>
<camunda:property id="placeholder" value="Need Oracle lookup" />
<camunda:property id="help" value="**The protocol owner name is always an entity.** For example, if this is a UVA Primary Investigator - Investigator initiated study, the Protocol Owner Name will be &#34;University of Virginia&#34;.\n\n#### How To:\nYou can find the name by typing any part (at least 3 characters) of the name.\n\nNote: This source of this list is in the Integration System (Oracle) and the information is owned by and managed by the OSP team.\n\nIf you are not finding the name or need to make any changes.\n1. Email &#39;Information Team listserve&#39; osp-infoteam@virginia.edu with the Subject Line &#34;Requesting New Sponsor Setup&#34; and provide the following information:\n - Sponsor Legal Name, Address, Sponsor Classification (Federal Government, Foreign Entity, Foundation, Industry, Local Government, Other Colleges &#38; Universities or State Government) as stated in the agreement/notification.\n - Copies of the agreement from the sponsor (contract, award letter, email, etc.).\n2. Once all the required information is received, OSP will add the name to the list.\n3. The updated list should be available for your selection in the workflow within 2 business days." />
</camunda:properties>
</camunda:formField>
<camunda:formField id="FormFieldPOHigherEd" label="Is the owner part of an institution of higher education?" type="boolean">
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0tl6dtl</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1049qrj</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="UserTask_0vmwq3j" name="Enter Clinical Trials.gov Info" camunda:formKey="form_key_enter_clinical_trials_info">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="CTG_NA" label="Not Applicable" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="checkbox" />
</camunda:properties>
<camunda:value id="enumNoRegister" name="Study does not need to be registered at ClinicalTrials.gov" />
</camunda:formField>
<camunda:formField id="CTG_NCT" label="Clinicaltrials.gov NCT #" type="string">
<camunda:properties>
<camunda:property id="description" value="It is the responsibility of Study Sponsor to register the study and obtain the #." />
<camunda:property id="help" value="#### How to\n\nThe format is NCT########. (11 characters total)" />
<camunda:property id="placeholder" value="Limit Length: 11" />
<camunda:property id="hide_expression" value="model.CTG_NA &#38;&#38; model.CTG_NA.enumNoRegister" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="CTG_StudyType" label="ClinicalTrials.gov Study Type" type="enum">
<camunda:properties>
<camunda:property id="hide_expression" value="model.CTG_NA &#38;&#38; model.CTG_NA.enumNoRegister" />
</camunda:properties>
<camunda:value id="Interv" name="Interventional" />
<camunda:value id="Obs" name="Observational" />
<camunda:value id="Obs_PR" name="Observational - Patient Registry" />
<camunda:value id="Exp_Acc" name="Expanded Access" />
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1bdgyx8</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1vfbg50</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="UserTask_034mwob" name="Enter Multi-Site Info" camunda:formKey="form_key_enter_multisite_info" camunda:priority="1">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="SiteInvolvement" label="Site Involvement" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="radio" />
<camunda:property id="help" value="Collaborative Analysis: a similar study being done by multiple sites for which there is NO sponsors/common protocol and data will only be shared for analysis purposes.\n\nFor additional Information visit:\n\nhttp://www.virginia.edu/vpr/irb/hsr/Multisite_Studies.html" />
</camunda:properties>
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
<camunda:value id="signle_site" name="Single Site" />
<camunda:value id="multi_site" name="Multi-Site" />
<camunda:value id="collab_analysis" name="Collaborative Analysis" />
</camunda:formField>
<camunda:formField id="MultiSiteUVaLeadPI" label="For Multi-Site only - Is the UVA PI the Lead PI" type="boolean">
<camunda:properties>
<camunda:property id="hide_expression" value="!(model.SiteInvolvement === &#39;multi_site&#39;)" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="SiteLocation" label="Site Location" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="radio" />
</camunda:properties>
<camunda:value id="US" name="US" />
<camunda:value id="OutsideUS" name="Outside US" />
<camunda:value id="Global" name="Global (US and outside US)" />
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0s6lscl</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_12u08ph</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="UserTask_1tmqx78" name="Enter Study Info" camunda:formKey="form_key_enter_study_info">
<bpmn:extensionElements>
<camunda:formData>
@ -83,163 +198,6 @@
<bpmn:incoming>SequenceFlow_1nyebxq</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0vnit5w</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="UserTask_034mwob" name="Enter Multi-Site Info" camunda:formKey="form_key_enter_multisite_info" camunda:priority="1">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="SiteInvolvement" label="Site Involvement" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="radio" />
<camunda:property id="help" value="Collaborative Analysis: a similar study being done by multiple sites for which there is NO sponsors/common protocol and data will only be shared for analysis purposes.\n\nFor additional Information visit:\n\nhttp://www.virginia.edu/vpr/irb/hsr/Multisite_Studies.html" />
</camunda:properties>
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
<camunda:value id="signle_site" name="Single Site" />
<camunda:value id="multi_site" name="Multi-Site" />
<camunda:value id="collab_analysis" name="Collaborative Analysis" />
</camunda:formField>
<camunda:formField id="MultiSiteUVaLeadPI" label="For Multi-Site only - Is the UVA PI the Lead PI" type="boolean">
<camunda:properties>
<camunda:property id="hide_expression" value="!(model.SiteInvolvement === &#39;multi_site&#39;)" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="SiteLocation" label="Site Location" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="radio" />
</camunda:properties>
<camunda:value id="US" name="US" />
<camunda:value id="OutsideUS" name="Outside US" />
<camunda:value id="Global" name="Global (US and outside US)" />
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0s6lscl</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_12u08ph</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="UserTask_0vmwq3j" name="Enter Clinical Trials.gov Info" camunda:formKey="form_key_enter_clinical_trials_info">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="CTG_NA" label="Not Applicable" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="checkbox" />
</camunda:properties>
<camunda:value id="enumNoRegister" name="Study does not need to be registered at ClinicalTrials.gov" />
</camunda:formField>
<camunda:formField id="CTG_NCT" label="Clinicaltrials.gov NCT #" type="string">
<camunda:properties>
<camunda:property id="description" value="It is the responsibility of Study Sponsor to register the study and obtain the #." />
<camunda:property id="help" value="#### How to\n\nThe format is NCT########. (11 characters total)" />
<camunda:property id="placeholder" value="Limit Length: 11" />
<camunda:property id="hide_expression" value="model.CTG_NA &#38;&#38; model.CTG_NA.enumNoRegister" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="CTG_StudyType" label="ClinicalTrials.gov Study Type" type="enum">
<camunda:properties>
<camunda:property id="hide_expression" value="model.CTG_NA &#38;&#38; model.CTG_NA.enumNoRegister" />
</camunda:properties>
<camunda:value id="Interv" name="Interventional" />
<camunda:value id="Obs" name="Observational" />
<camunda:value id="Obs_PR" name="Observational - Patient Registry" />
<camunda:value id="Exp_Acc" name="Expanded Access" />
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1bdgyx8</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1vfbg50</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="SequenceFlow_1oz7y6d" sourceRef="ParallelGateway_0x50y2p" targetRef="Task_1h8282e" />
<bpmn:sequenceFlow id="SequenceFlow_0vbmpyv" sourceRef="Task_1h8282e" targetRef="ParallelGateway_0uesolv" />
<bpmn:userTask id="Task_1h8282e" name="Enter Funding Info" camunda:formKey="form_key_enter_funding_info">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="NotGrant" label="Is there a contract for external funding? (Not a Grant)" type="boolean" defaultValue="No">
<camunda:properties>
<camunda:property id="help" value="For **contracts that include external funding**, an electronic proposal routing form (ePRF) will need to be submitted through ResearchUVA. The &#34;ePRF Completion in ResearchUVa&#34; Step will provide details for ePRF submission.\n\nIf study is funded by a grant, answer &#34;No&#34;.\n\n**External funding** means the award is funded by an entity outside the University of Virginia." />
</camunda:properties>
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
</camunda:formField>
<camunda:formField id="NonFundedAgreement" label="Is there a Non-Funded Agreement?" type="boolean">
<camunda:properties>
<camunda:property id="help" value="For **non-funded agreements** (material transfer agreements, data use agreements, etc), a non-funded agreement (NFA) form will need to be completed and submitted in the &#34;Non-Funded Agreement Submission&#34; Step.\n\nIf you are unsure which of the above applies to your agreement, please contact Lynn Koplin (lkv5c@virginia.edu) in the Office of Sponsored Programs." />
</camunda:properties>
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
</camunda:formField>
<camunda:formField id="ImmediateSourceFunds" label="Immediate Source of the Funds" type="enum">
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
<camunda:value id="Federal" name="Federal" />
<camunda:value id="StateLocal" name="State/Local" />
<camunda:value id="Foundation" name="Foundation/Not for Profit" />
<camunda:value id="Industry" name="Industry" />
<camunda:value id="InternalDepartmental" name="Internal/Departmental (including gifts or philanthropy)" />
<camunda:value id="IncomingSubAward" name="Incoming Sub Award" />
<camunda:value id="NoFunding" name="No Funding" />
<camunda:value id="OtherCollegesUniversities" name="Other Colleges and Universities" />
</camunda:formField>
<camunda:formField id="ImmediateSourceFundsLegalName" label="Immediate Source Funds Legal Name" type="string" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1oz7y6d</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0vbmpyv</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="UserTask_1ubwe2g" name="Enter Protocol Owner Info" camunda:formKey="FormKey_EnterProtocolOwnerInfo">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="FormField_ProtocolOwnerInfo" label="What is the Protocol Owner?" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="dropdown" />
<camunda:property id="description" value="The protocol owner name is always an entity. For example, if this is a UVA Primary Investigator - Investigator initiated study, the Protocol Owner Name will be &#34;University of Virginia&#34;" />
<camunda:property id="help" value="**The protocol owner name is always an entity.** For example, if this is a UVA Primary Investigator - Investigator initiated study, the Protocol Owner Name will be &#39;University of Virginia&#39;.\n\n### **How To:**\nYou can find the name by typing any part (at least 3 characters) of the name.\nNote: This source of this list is in the Integration System (Oracle) and the information is owned by and managed by the OSP team.\n**If you are not finding the name or need to make any changes:**\n1. Email &#39;Information Team listserve&#39; osp-infoteam@virginia.edu with the Subject Line &#34;Requesting New Sponsor Setup&#34; and provide the following information:\n - Sponsor Legal Name, Address, Sponsor Classification (Federal Government, Foreign Entity, Foundation, Industry, Local Government, Other Colleges &#38; Universities or State Government) as stated in the agreement/notification.\n - Copies of the agreement from the sponsor (contract, award letter, email, etc.).\n2. Once all the required information is received, OSP will add the name to the list.\n3. The updated list should be available for your selection in the workflow within 2 business days." />
</camunda:properties>
<camunda:value id="Ind" name="Industry" />
<camunda:value id="IntPI" name="UVA Primary Investigator - Investigator Initiated" />
<camunda:value id="OutPI" name="Outside Primary Investigator - Investigator Initiated" />
<camunda:value id="CoopGrp" name="Cooperative Group" />
<camunda:value id="OthColUni" name="Other Colleges and Universities" />
</camunda:formField>
<camunda:formField id="ProtocolOwnerName" label="Protocol Owner Name" type="string">
<camunda:properties>
<camunda:property id="placeholder" value="Need Oracle lookup" />
<camunda:property id="help" value="**The protocol owner name is always an entity.** For example, if this is a UVA Primary Investigator - Investigator initiated study, the Protocol Owner Name will be &#34;University of Virginia&#34;.\n\n#### How To:\nYou can find the name by typing any part (at least 3 characters) of the name.\n\nNote: This source of this list is in the Integration System (Oracle) and the information is owned by and managed by the OSP team.\n\nIf you are not finding the name or need to make any changes.\n1. Email &#39;Information Team listserve&#39; osp-infoteam@virginia.edu with the Subject Line &#34;Requesting New Sponsor Setup&#34; and provide the following information:\n - Sponsor Legal Name, Address, Sponsor Classification (Federal Government, Foreign Entity, Foundation, Industry, Local Government, Other Colleges &#38; Universities or State Government) as stated in the agreement/notification.\n - Copies of the agreement from the sponsor (contract, award letter, email, etc.).\n2. Once all the required information is received, OSP will add the name to the list.\n3. The updated list should be available for your selection in the workflow within 2 business days." />
</camunda:properties>
</camunda:formField>
<camunda:formField id="FormFieldPOHigherEd" label="Is the owner part of an institution of higher education?" type="boolean">
<camunda:validation>
<camunda:constraint name="required" config="true" />
</camunda:validation>
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0tl6dtl</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1049qrj</bpmn:outgoing>
</bpmn:userTask>
<bpmn:parallelGateway id="ParallelGateway_0x50y2p">
<bpmn:incoming>SequenceFlow_0xfv8yt</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1nyebxq</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0s6lscl</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0tl6dtl</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1bdgyx8</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1oz7y6d</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:parallelGateway id="ParallelGateway_0uesolv">
<bpmn:incoming>SequenceFlow_0vnit5w</bpmn:incoming>
<bpmn:incoming>SequenceFlow_12u08ph</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1049qrj</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1vfbg50</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0vbmpyv</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0skynyx</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:endEvent id="EndEvent_0d4jix4">
<bpmn:incoming>SequenceFlow_0skynyx</bpmn:incoming>
</bpmn:endEvent>
<bpmn:startEvent id="StartEvent_1k8r624">
<bpmn:outgoing>SequenceFlow_0xfv8yt</bpmn:outgoing>
</bpmn:startEvent>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1c9d1zt">
@ -250,13 +208,13 @@
<dc:Bounds x="218" y="347" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1tmqx78_di" bpmnElement="UserTask_1tmqx78">
<dc:Bounds x="430" y="120" width="100" height="80" />
<dc:Bounds x="430" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_034mwob_di" bpmnElement="UserTask_034mwob">
<dc:Bounds x="430" y="220" width="100" height="80" />
<dc:Bounds x="430" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1ubwe2g_di" bpmnElement="UserTask_1ubwe2g">
<dc:Bounds x="430" y="430" width="100" height="80" />
<dc:Bounds x="430" y="380" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ParallelGateway_0x50y2p_di" bpmnElement="ParallelGateway_0x50y2p">
<dc:Bounds x="305" y="340" width="50" height="50" />
@ -268,7 +226,7 @@
<dc:Bounds x="708" y="347" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0vmwq3j_di" bpmnElement="UserTask_0vmwq3j">
<dc:Bounds x="430" y="530" width="100" height="80" />
<dc:Bounds x="430" y="490" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0xfv8yt_di" bpmnElement="SequenceFlow_0xfv8yt">
<di:waypoint x="254" y="365" />
@ -276,63 +234,52 @@
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1nyebxq_di" bpmnElement="SequenceFlow_1nyebxq">
<di:waypoint x="330" y="340" />
<di:waypoint x="330" y="160" />
<di:waypoint x="430" y="160" />
<di:waypoint x="330" y="190" />
<di:waypoint x="430" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0vnit5w_di" bpmnElement="SequenceFlow_0vnit5w">
<di:waypoint x="530" y="160" />
<di:waypoint x="630" y="160" />
<di:waypoint x="530" y="190" />
<di:waypoint x="630" y="190" />
<di:waypoint x="630" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0s6lscl_di" bpmnElement="SequenceFlow_0s6lscl">
<di:waypoint x="355" y="365" />
<di:waypoint x="390" y="365" />
<di:waypoint x="390" y="260" />
<di:waypoint x="430" y="260" />
<di:waypoint x="390" y="300" />
<di:waypoint x="430" y="300" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_12u08ph_di" bpmnElement="SequenceFlow_12u08ph">
<di:waypoint x="530" y="260" />
<di:waypoint x="570" y="260" />
<di:waypoint x="530" y="300" />
<di:waypoint x="570" y="300" />
<di:waypoint x="570" y="365" />
<di:waypoint x="605" y="365" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0tl6dtl_di" bpmnElement="SequenceFlow_0tl6dtl">
<di:waypoint x="355" y="365" />
<di:waypoint x="390" y="365" />
<di:waypoint x="390" y="470" />
<di:waypoint x="430" y="470" />
<di:waypoint x="390" y="420" />
<di:waypoint x="430" y="420" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1049qrj_di" bpmnElement="SequenceFlow_1049qrj">
<di:waypoint x="530" y="470" />
<di:waypoint x="570" y="470" />
<di:waypoint x="530" y="420" />
<di:waypoint x="570" y="420" />
<di:waypoint x="570" y="365" />
<di:waypoint x="605" y="365" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1bdgyx8_di" bpmnElement="SequenceFlow_1bdgyx8">
<di:waypoint x="330" y="390" />
<di:waypoint x="330" y="570" />
<di:waypoint x="430" y="570" />
<di:waypoint x="330" y="530" />
<di:waypoint x="430" y="530" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1vfbg50_di" bpmnElement="SequenceFlow_1vfbg50">
<di:waypoint x="530" y="570" />
<di:waypoint x="630" y="570" />
<di:waypoint x="530" y="530" />
<di:waypoint x="630" y="530" />
<di:waypoint x="630" y="390" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0skynyx_di" bpmnElement="SequenceFlow_0skynyx">
<di:waypoint x="655" y="365" />
<di:waypoint x="708" y="365" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1oz7y6d_di" bpmnElement="SequenceFlow_1oz7y6d">
<di:waypoint x="355" y="365" />
<di:waypoint x="430" y="365" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0vbmpyv_di" bpmnElement="SequenceFlow_0vbmpyv">
<di:waypoint x="530" y="365" />
<di:waypoint x="605" y="365" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="UserTask_1ny72v6_di" bpmnElement="Task_1h8282e">
<dc:Bounds x="430" y="325" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

View File

@ -14,11 +14,7 @@
<camunda:property id="placeholder" value="Merck" />
</camunda:properties>
</camunda:formField>
<camunda:formField id="FormField_FROMOSP" label="From OSP" type="string" />
<camunda:formField id="FormField_SponsorState" label="State" type="enum">
<camunda:value id="VA" name="Virginia" />
<camunda:value id="WA" name="Washington" />
</camunda:formField>
<camunda:formField id="FormField_FromOSP" label="From OSP" type="string" />
<camunda:formField id="FormField_Type" label="Select all that apply:" type="enum">
<camunda:properties>
<camunda:property id="enum_type" value="checkbox" />
@ -26,14 +22,7 @@
<camunda:value id="sponsor" name="Sponsor" />
<camunda:value id="funding_source" name="Funding Source" />
</camunda:formField>
<camunda:formField id="FormField_FundType" label="Funding Type" type="enum">
<camunda:value id="immedicate" name="Immediate" />
<camunda:value id="originating" name="Originating" />
<camunda:value id="incoming" name="Incoming Sub Award" />
</camunda:formField>
<camunda:formField id="FormField_ContactName" label="Contact Name" type="string" />
<camunda:formField id="FormField_ContactEmail" label="Contact Email" type="string" />
<camunda:formField id="FormField_Notes" label="Notes" type="text_area">
<camunda:formField id="FormField_Notes" label="Notes" type="textarea">
<camunda:properties>
<camunda:property id="rows" value="5" />
</camunda:properties>
@ -51,10 +40,10 @@
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0quormc">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="167" y="99" width="36" height="36" />
<dc:Bounds x="162" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_17znkku_di" bpmnElement="SequenceFlow_17znkku">
<di:waypoint x="203" y="117" />
<di:waypoint x="198" y="117" />
<di:waypoint x="268" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="UserTask_15oiwqt_di" bpmnElement="Task_14cuhvm">

View File

@ -10,6 +10,7 @@ from crc.models.user import UserModel
from crc.models.workflow import WorkflowSpecModel
from crc.services.file_service import FileService
from crc.services.workflow_processor import WorkflowProcessor
from crc.models.protocol_builder import ProtocolBuilderStatus
class ExampleDataLoader:
@ -41,7 +42,7 @@ class ExampleDataLoader:
id=1,
title='The impact of fried pickles on beer consumption in bipedal software developers.',
last_updated=datetime.datetime.now(),
protocol_builder_status='in_process',
protocol_builder_status=ProtocolBuilderStatus.IN_PROCESS,
primary_investigator_id='dhf8r',
sponsor='Sartography Pharmaceuticals',
ind_number='1234',
@ -51,7 +52,7 @@ class ExampleDataLoader:
id=2,
title='Requirement of hippocampal neurogenesis for the behavioral effects of soft pretzels',
last_updated=datetime.datetime.now(),
protocol_builder_status='in_process',
protocol_builder_status=ProtocolBuilderStatus.IN_PROCESS,
primary_investigator_id='dhf8r',
sponsor='Makerspace & Co.',
ind_number='5678',
@ -69,10 +70,11 @@ class ExampleDataLoader:
name="crc2_training_session_data_security_plan",
display_name="CR Connect2 - Training Session - Data Security Plan",
description='Part of Milestone 3 Deliverable')
self.create_spec(id="sponsor_funding_source",
name="sponsor_funding_source",
display_name="Sponsor and/or Funding Source ",
description='TBD')
self.create_spec(id="crc2_training_session_sponsor_funding_source",
name="crc2_training_session_sponsor_funding_source",
display_name="CR Connect2 - Training Session - Sponsor and/or Funding Source",
description='Part of Milestone 3 Deliverable')
def create_spec(self, id, name, display_name="", description="", filepath=None):
"""Assumes that a directory exists in static/bpmn with the same name as the given id.

View File

@ -1,8 +1,8 @@
"""empty message
Revision ID: cb3a03c10a0e
Revision ID: 1c6e4e179f8e
Revises:
Create Date: 2020-02-28 11:12:56.150837
Create Date: 2020-03-03 15:51:45.550681
"""
from alembic import op
@ -10,7 +10,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cb3a03c10a0e'
revision = '1c6e4e179f8e'
down_revision = None
branch_labels = None
depends_on = None
@ -43,7 +43,7 @@ def upgrade():
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('title', sa.String(), nullable=True),
sa.Column('last_updated', sa.DateTime(timezone=True), nullable=True),
sa.Column('protocol_builder_status', sa.Enum('out_of_date', 'in_process', 'complete', 'updating', name='protocolbuilderstatus'), nullable=True),
sa.Column('protocol_builder_status', sa.Enum('DRAFT', 'IN_PROCESS', 'IN_REVIEW', 'REVIEW_COMPLETE', 'INACTIVE', name='protocolbuilderstatus'), nullable=True),
sa.Column('primary_investigator_id', sa.String(), nullable=True),
sa.Column('sponsor', sa.String(), nullable=True),
sa.Column('hsr_number', sa.String(), nullable=True),

View File

@ -14,5 +14,13 @@
"Q_COMPLETE": true,
"STUDYID": 65432,
"TITLE": "Peanut butter consumption among quiet dogs"
},
{
"DATE_MODIFIED": "2020-02-19T14:24:55.101695",
"HSRNUMBER": "45678",
"NETBADGEID": "dhf8r",
"Q_COMPLETE": true,
"STUDYID": 1,
"TITLE": "Efficacy of xenomorph bio-augmented circuits on dexterity of cybernetic prostheses"
}
]

View File

@ -1,11 +1,12 @@
import json
from datetime import datetime, timezone
from unittest.mock import patch
from unittest.mock import patch, Mock
from crc import session
from crc.models.api_models import WorkflowApiSchema
from crc.models.study import StudyModel, StudyModelSchema
from crc.models.protocol_builder import ProtocolBuilderStatus
from crc.models.protocol_builder import ProtocolBuilderStatus, ProtocolBuilderStudyDetailsSchema, \
ProtocolBuilderStudySchema
from crc.models.workflow import WorkflowSpecModel, WorkflowSpecModelSchema, WorkflowModel, WorkflowStatus
from tests.base_test import BaseTest
@ -24,7 +25,7 @@ class TestStudyApi(BaseTest):
"title": "Phase III Trial of Genuine People Personalities (GPP) Autonomous Intelligent Emotional Agents "
"for Interstellar Spacecraft",
"last_updated": datetime.now(tz=timezone.utc),
"protocol_builder_status": ProtocolBuilderStatus.in_process,
"protocol_builder_status": ProtocolBuilderStatus.IN_PROCESS,
"primary_investigator_id": "tricia.marie.mcmillan@heartofgold.edu",
"sponsor": "Sirius Cybernetics Corporation",
"ind_number": "567890",
@ -49,7 +50,7 @@ class TestStudyApi(BaseTest):
self.load_example_data()
study: StudyModel = session.query(StudyModel).first()
study.title = "Pilot Study of Fjord Placement for Single Fraction Outcomes to Cortisol Susceptibility"
study.protocol_builder_status = ProtocolBuilderStatus.complete
study.protocol_builder_status = ProtocolBuilderStatus.REVIEW_COMPLETE
rv = self.app.put('/v1.0/study/%i' % study.id,
content_type="application/json",
headers=self.logged_in_headers(),
@ -60,17 +61,19 @@ class TestStudyApi(BaseTest):
self.assertEqual(study.title, db_study.title)
self.assertEqual(study.protocol_builder_status, db_study.protocol_builder_status)
@patch('crc.services.protocol_builder.requests.get')
def test_get_all_studies(self, mock_get):
@patch('crc.services.protocol_builder.ProtocolBuilderService.get_study_details') # mock_details
@patch('crc.services.protocol_builder.ProtocolBuilderService.get_studies') # mock_studies
def test_get_all_studies(self, mock_studies, mock_details):
self.load_example_data()
db_studies_before = session.query(StudyModel).all()
num_db_studies_before = len(db_studies_before)
mock_get.return_value.ok = True
mock_get.return_value.text = self.protocol_builder_response('user_studies.json')
# pb_response = ProtocolBuilderService.get_studies(self.test_uid)
# self.assertIsNotNone(pb_response)
# Mock Protocol Builder response
studies_response = self.protocol_builder_response('user_studies.json')
mock_studies.return_value = ProtocolBuilderStudySchema(many=True).loads(studies_response)
details_response = self.protocol_builder_response('study_details.json')
mock_details.return_value = ProtocolBuilderStudyDetailsSchema().loads(details_response)
self.load_example_data()
api_response = self.app.get('/v1.0/study',
@ -78,11 +81,6 @@ class TestStudyApi(BaseTest):
headers=self.logged_in_headers(),
content_type="application/json")
self.assert_success(api_response)
db_studies_after = session.query(StudyModel).all()
num_db_studies_after = len(db_studies_after)
self.assertGreater(num_db_studies_after, num_db_studies_before)
json_data = json.loads(api_response.get_data(as_text=True))
api_studies = StudyModelSchema(many=True).load(json_data, session=session)
@ -95,8 +93,13 @@ class TestStudyApi(BaseTest):
else:
num_active += 1
self.assertEqual(num_inactive, num_db_studies_before)
self.assertEqual(num_active, num_db_studies_after - num_db_studies_before)
db_studies_after = session.query(StudyModel).all()
num_db_studies_after = len(db_studies_after)
self.assertGreater(num_db_studies_after, num_db_studies_before)
self.assertGreater(num_inactive, 0)
self.assertGreater(num_active, 0)
self.assertEqual(len(api_studies), num_db_studies_after)
self.assertEqual(num_active + num_inactive, num_db_studies_after)
def test_study_api_get_single_study(self):
self.load_example_data()