Fixing a stupid mistake - must have typed a ' mark during commit.

Script should inherit from object.
Updating the ids so I could more easily test and assure things were working correctly.
This commit is contained in:
Dan Funk 2020-04-08 13:39:42 -04:00
parent c79415a794
commit 316b9e6e8d
6 changed files with 124 additions and 63 deletions

View File

@ -47,7 +47,7 @@ def update_study(study_id, body):
def get_study(study_id):
study_service = StudyService()
study = study_service.get_study(study_id)
` if(study is None):
if(study is None):
raise ApiError("Study not found", status_code=404)
schema = StudySchema()
return schema.dump(study)

View File

@ -5,7 +5,7 @@ import pkgutil
from crc.api.common import ApiError
class Script:
class Script(object):
""" Provides an abstract class that defines how scripts should work, this
must be extended in all Script Tasks."""

View File

@ -89,17 +89,7 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_0y21euo" sourceRef="ExclusiveGateway_14igy57" targetRef="Task_ReviewPharmacyManualStatus" />
<bpmn:userTask id="Task_ReviewPharmacyManualStatus" name="Review Pharmacy Manual Status" camunda:formKey="Pharmacy Manual Status">
<bpmn:documentation>{% if IRB_UplCnt.DrugDeviceDocument.PharmacyManual &gt; 0 %}
{% if IRB_UplCnt.DrugDeviceDocument.PharmacyManual == 1 %}
{{IRB_UplCnt.DrugDeviceDocument.PharmacyManual}} Pharmacy Manual Uploaded
"This manual will be sent as part of your IDS Submission"
{% else %}
{{IRB_UplCnt.DrugDeviceDocument.PharmacyManual}} Pharmacy Manuals Uploaded
"These manuals will be sent as part of your IDS Submission
{% endif %}
{% else %}
"The Pharmacy Manual has not been uploaded. If you do not intend to upload a manual before you IDS submission, please complete the questions below. If you do intend to upload a manual, you do not need to complete them"
{% endif %}</bpmn:documentation>
<bpmn:documentation>{{ElementDoc_PharmMan}}</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="FormField_isSponsor" label="Will the sponsor be providing the Pharmacy Manual?" type="boolean">
@ -122,17 +112,7 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
</bpmn:userTask>
<bpmn:sequenceFlow id="SequenceFlow_1pg0dkw" sourceRef="Task_ReviewPharmacyManualStatus" targetRef="ExclusiveGateway_1b69uum" />
<bpmn:userTask id="UserTask_ReviewInvestigatorsBrochureStatus" name="Review Investigator&#39;s Brochure Status" camunda:formKey="Investigator&#39;s Brochure Status">
<bpmn:documentation>{% if IRB_UplCnt.DrugDeviceDocument.InvestigatorBrochure &gt; 0 %}
{% if IRB_UplCnt.DrugDeviceDocument.InvestigatorBrochure == 1 %}
{{IRB_UplCnt.DrugDeviceDocument.InvestigatorBrochure}} Pharmacy Manual Uploaded
"This brochure will be sent as part of your IDS Submission"
{% else %}
{{IRB_UplCnt.DrugDeviceDocument.InvestigatorBrochure}} Pharmacy Manuals Uploaded
"These brochures will be sent as part of your IDS Submission
{% endif %}
{% else %}
"The Investigator's Brochure has not been uploaded. If you do not intend to upload a manual before you IDS submission, please complete the questions below. If you do intend to upload a manual, you do not need to complete them"
{% endif %}</bpmn:documentation>
<bpmn:documentation>{{ElementDoc_InvestigatorsBrochure}}</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="FormField_isSponsor" label="Will the sponsor be providing the Investigator&#39;s Brochure?" type="boolean">
@ -156,17 +136,7 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
<bpmn:sequenceFlow id="SequenceFlow_0jwnfzy" sourceRef="ExclusiveGateway_14igy57" targetRef="UserTask_ReviewInvestigatorsBrochureStatus" />
<bpmn:sequenceFlow id="SequenceFlow_13fzv9y" sourceRef="UserTask_ReviewInvestigatorsBrochureStatus" targetRef="ExclusiveGateway_1b69uum" />
<bpmn:userTask id="UserTask_ReviewIVRS-IWRS-IXRSManualStatus" name="Review IVRS/IWRS/IXRS Manual Status" camunda:formKey="IVRS/IWRS/IXRS Manual Status">
<bpmn:documentation>{% if IRB_UplCnt.DrugDeviceDocument.IVRSIWRSIXRSManual &gt; 0 %}
{% if IRB_UplCnt.DrugDeviceDocument.IVRSIWRSIXRSManual == 1 %}
{{IRB_UplCnt.DrugDeviceDocument.IVRSIWRSIXRSManual}} Pharmacy Manual Uploaded
"This manual will be sent as part of your IDS Submission"
{% else %}
{{IRB_UplCnt.DrugDeviceDocument.IVRSIWRSIXRSManual}} Pharmacy Manuals Uploaded
"These manuals will be sent as part of your IDS Submission
{% endif %}
{% else %}
"The IVRS/IWRS/IXRS Manual has not been uploaded. If you do not intend to upload a manual before you IDS submission, please complete the questions below. If you do intend to upload a manual, you do not need to complete them"
{% endif %}</bpmn:documentation>
<bpmn:documentation>{{ElementDoc_IVRSIWRSIXRS}}</bpmn:documentation>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="FormField_Required" label="Does the study require use of IVRS/IXRS/IWRS?" type="enum">
@ -213,7 +183,7 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
<bpmn:outgoing>SequenceFlow_1kam5in</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:businessRuleTask id="BusinessRuleTask_InvestigatorsBrochure" name="Investigator&#39;s Brochure" camunda:decisionRef="Decision_InvestigatorBrochure">
<bpmn:incoming>SequenceFlow_1dexemq</bpmn:incoming>
<bpmn:incoming>Flow_1x9d2mo</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1dcu8zu</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:businessRuleTask id="BusinessRuleTask_IVRS-IWRS-IXRSManual" name="IVRS/IWRS/IXRS Manual" camunda:decisionRef="Decision_IVRS-IWRS-IXRS">
@ -223,7 +193,7 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
<bpmn:sequenceFlow id="SequenceFlow_1dcu8zu" sourceRef="BusinessRuleTask_InvestigatorsBrochure" targetRef="BusinessRuleTask_PharmacyManual" />
<bpmn:sequenceFlow id="SequenceFlow_1kam5in" sourceRef="BusinessRuleTask_PharmacyManual" targetRef="BusinessRuleTask_IVRS-IWRS-IXRSManual" />
<bpmn:sequenceFlow id="SequenceFlow_1bkjyhx" sourceRef="BusinessRuleTask_IVRS-IWRS-IXRSManual" targetRef="ExclusiveGateway_14igy57" />
<bpmn:sequenceFlow id="SequenceFlow_1dexemq" sourceRef="StartEvent_1" targetRef="BusinessRuleTask_InvestigatorsBrochure" />
<bpmn:sequenceFlow id="SequenceFlow_1dexemq" sourceRef="StartEvent_1" targetRef="Activity_LoadDocuments" />
<bpmn:sequenceFlow id="SequenceFlow_0lixqzs" sourceRef="ExclusiveGateway_1b69uum" targetRef="UserTask_03o04d0" />
<bpmn:userTask id="UserTask_03o04d0" name="Enter Staff Training" camunda:formKey="Staff Training">
<bpmn:extensionElements>
@ -243,9 +213,19 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
<bpmn:outgoing>SequenceFlow_1r7kcks</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="SequenceFlow_1r7kcks" sourceRef="UserTask_03o04d0" targetRef="EndEvent_0jypqha" />
<bpmn:sequenceFlow id="Flow_1x9d2mo" sourceRef="Activity_LoadDocuments" targetRef="BusinessRuleTask_InvestigatorsBrochure" />
<bpmn:scriptTask id="Activity_LoadDocuments" name="Load Documents">
<bpmn:incoming>SequenceFlow_1dexemq</bpmn:incoming>
<bpmn:outgoing>Flow_1x9d2mo</bpmn:outgoing>
<bpmn:script>Documents</bpmn:script>
</bpmn:scriptTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_IDS">
<bpmndi:BPMNEdge id="Flow_1x9d2mo_di" bpmnElement="Flow_1x9d2mo">
<di:waypoint x="200" y="340" />
<di:waypoint x="270" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1r7kcks_di" bpmnElement="SequenceFlow_1r7kcks">
<di:waypoint x="1180" y="340" />
<di:waypoint x="1272" y="340" />
@ -255,8 +235,8 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
<di:waypoint x="1080" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dexemq_di" bpmnElement="SequenceFlow_1dexemq">
<di:waypoint x="178" y="340" />
<di:waypoint x="270" y="340" />
<di:waypoint x="48" y="340" />
<di:waypoint x="100" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1bkjyhx_di" bpmnElement="SequenceFlow_1bkjyhx">
<di:waypoint x="645" y="340" />
@ -318,6 +298,9 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
<di:waypoint x="720" y="120" />
<di:waypoint x="790" y="120" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="12" y="322" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0wr3vp4_di" bpmnElement="Task_EnterIDSStudyIdentification">
<dc:Bounds x="790" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
@ -354,8 +337,8 @@ Protocol Owner: **(need to insert value here)**</bpmn:documentation>
<bpmndi:BPMNShape id="UserTask_03o04d0_di" bpmnElement="UserTask_03o04d0">
<dc:Bounds x="1080" y="300" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="142" y="322" width="36" height="36" />
<bpmndi:BPMNShape id="Activity_0f5ox7w_di" bpmnElement="Activity_LoadDocuments">
<dc:Bounds x="100" y="300" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>

View File

@ -5,19 +5,45 @@
<biodi:bounds x="150" y="150" width="180" height="80" />
</extensionElements>
<decisionTable id="decisionTable_1">
<input id="input_1">
<inputExpression id="inputExpression_1" typeRef="string">
<text></text>
<input id="input_1" label="Investigator&#39;s Brochure Form Upload Count">
<inputExpression id="inputExpression_1" typeRef="integer">
<text>Documents["DrugDevDoc_InvestBrochure"]["count"]</text>
</inputExpression>
</input>
<output id="output_1" label="IRB_UplCnt.DrugDeviceDocument.InvestigatorBrochure" name="IRB_UplCnt.DrugDeviceDocument.InvestigatorBrochure" typeRef="boolean" />
<output id="output_1" label="Investigator&#39;s Brochure(s) Uploaded?" name="isInvestigatorsBrochure" typeRef="boolean" />
<output id="OutputClause_1f3mlfn" label="Investigator&#39;s Broshure Form Banner" name="ElementDoc_InvestigatorsBrochure" typeRef="string" />
<rule id="DecisionRule_0zvgaym">
<inputEntry id="UnaryTests_0mwq0my">
<text></text>
<text>0</text>
</inputEntry>
<outputEntry id="LiteralExpression_1egtix6">
<text>false</text>
</outputEntry>
<outputEntry id="LiteralExpression_0syurh2">
<text>"The Investigator's Brochure has not been uploaded. If you do not intend to upload a manual before you IDS submission, please complete the questions below. If you do intend to upload a brochure, you do not need to complete them."</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1tex88t">
<inputEntry id="UnaryTests_02u2t7y">
<text>1</text>
</inputEntry>
<outputEntry id="LiteralExpression_10fvqcp">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_12xmgog">
<text>"This brochure will be sent as part of your IDS Submission."</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1h9ji9j">
<inputEntry id="UnaryTests_1q9mscj">
<text>&gt; 1</text>
</inputEntry>
<outputEntry id="LiteralExpression_0ybjs1p">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_1fhucbl">
<text>"These brochures will be sent as part of your IDS Submission."</text>
</outputEntry>
</rule>
</decisionTable>
</decision>

View File

@ -1,23 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/1.0" id="Definitions_13ibzgx" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
<decision id="Decision_IVRS-IWRS-IXRS" name="Decision_IVRS-IWRS-IXRS">
<decision id="Decision_IVRS-IWRS-IXRS" name="IVRS-IWRS-IXRS Manual">
<extensionElements>
<biodi:bounds x="150" y="150" width="180" height="80" />
</extensionElements>
<decisionTable id="decisionTable_1">
<input id="input_1">
<inputExpression id="inputExpression_1" typeRef="string">
<text></text>
<input id="input_1" label="IVRS-IWRS-IXRS Manual Count">
<inputExpression id="inputExpression_1" typeRef="integer">
<text>Documents["DrugDevDoc_IVRSIWRSIXRSMan"]["count"]</text>
</inputExpression>
</input>
<output id="output_1" label="IRB_UplCnt.DrugDeviceDocument.IVRSIWRSIXRSManual" name="IRB_UplCnt.DrugDeviceDocument.IVRSIWRSIXRSManual" typeRef="boolean" />
<output id="output_1" label="IVRS-IWRS-IXRS Manual Uploaded?" name="isIVRS-IWRS-IXRS" typeRef="boolean" />
<output id="OutputClause_00aciq3" label="IVRS-IWRS-IXRS Form Banner" name="ElementDoc_IVRSIWRSIXRS" typeRef="string" />
<rule id="DecisionRule_0qbyqkn">
<inputEntry id="UnaryTests_0k06tzv">
<text></text>
<text>0</text>
</inputEntry>
<outputEntry id="LiteralExpression_1i0v4vv">
<text>false</text>
</outputEntry>
<outputEntry id="LiteralExpression_1rmabtw">
<text>"The IVRS/IWRS/IXRS Manual has not been uploaded. If you do not intend to upload a manual before you IDS submission, please complete the questions below. If you do intend to upload a manual, you do not need to complete them."</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1qiq2ek">
<inputEntry id="UnaryTests_0rxyo8h">
<text>1</text>
</inputEntry>
<outputEntry id="LiteralExpression_19ht3su">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_00sov94">
<text>"This manual will be sent as part of your IDS Submission"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1t2dpzl">
<inputEntry id="UnaryTests_0z1i32u">
<text>&gt; 0</text>
</inputEntry>
<outputEntry id="LiteralExpression_047zb7w">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_00yj9ia">
<text>"These manuals will be sent as part of your IDS Submission"</text>
</outputEntry>
</rule>
</decisionTable>
</decision>

View File

@ -1,23 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/1.0" id="Definitions_02iuvuc" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
<decision id="Decision_PharmacyManual" name="Decision_PharmacyManual">
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/1.0" id="Definitions_a268e14" name="DRD" namespace="http://camunda.org/schema/1.0/dmn">
<decision id="Decision_PharmacyManual" name="Pharmacy Manual">
<extensionElements>
<biodi:bounds x="150" y="150" width="180" height="80" />
<biodi:bounds x="190" y="140" width="180" height="80" />
</extensionElements>
<decisionTable id="decisionTable_1">
<input id="input_1" label="All cases">
<inputExpression id="inputExpression_1" typeRef="string" expressionLanguage="FEEL">
<text></text>
<input id="input_1" label="Pharmacy Manual Upload Count">
<inputExpression id="inputExpression_1" typeRef="integer">
<text>Documents["DrugDevDoc_PharmManual"]["count"]</text>
</inputExpression>
</input>
<output id="output_1" label="IRB_UplCnt.DrugDeviceDocument.PharmacyManual" name="IRB_UplCnt.DrugDeviceDocument.PharmacyManual" typeRef="boolean" />
<rule id="DecisionRule_19gnnyv">
<inputEntry id="UnaryTests_044pg07">
<text></text>
<output id="output_1" label="Pharmacy Manual(s) Uploaded?" name="isPharmacyManual" typeRef="boolean" />
<output id="OutputClause_1vbolzy" label="Pharmacy Manual Form Banner" name="ElementDoc_PharmMan" typeRef="string" />
<rule id="DecisionRule_0hvsnu9">
<inputEntry id="UnaryTests_1ll10nk">
<text>0</text>
</inputEntry>
<outputEntry id="LiteralExpression_1da4cm8">
<outputEntry id="LiteralExpression_1kidcjg">
<text>false</text>
</outputEntry>
<outputEntry id="LiteralExpression_0tk68d3">
<text>"The Pharmacy Manual has not been uploaded. If you do not intend to upload a manual before your IDS submission, please complete the questions below. If you do intend to upload a manual, you do not need to complete them."</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0yqphk1">
<inputEntry id="UnaryTests_0p3500o">
<text>1</text>
</inputEntry>
<outputEntry id="LiteralExpression_08v3bfw">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_1espyxg">
<text>"This manual will be sent as part of your IDS Submission"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1cwcqvd">
<inputEntry id="UnaryTests_0b49gpa">
<text>&gt; 1</text>
</inputEntry>
<outputEntry id="LiteralExpression_1hb3ip1">
<text>true</text>
</outputEntry>
<outputEntry id="LiteralExpression_0yslf6v">
<text>"These manuals will be sent as part of your IDS Submission"</text>
</outputEntry>
</rule>
</decisionTable>
</decision>