Flow_0kcrx5l
Flow_0kcrx5l
Flow_1dcsioh
current_user = ldap()
investigators = study_info('investigators')
# Primary Investigator
pi = investigators.get('PI', None)
is_cu_pi = False
if pi != None:
hasPI = True
study_data_set("PiUid",pi['uid'])
if pi.get('uid', None) != None:
pi_invalid_uid = False
if pi['uid'] == current_user['uid']:
is_cu_pi = True
else:
pi_invalid_uid = True
else:
hasPI = False
# Department Chair
dc = investigators.get('DEPT_CH', None)
if dc != None:
if dc.get('uid', None) != None:
dc_invalid_uid = False
else:
dc_invalid_uid = True
else:
dc_invalid_uid = False
# Primary Coordinators
pcs = {}
is_cu_pc = False
cnt_pcs_uid = 0
for k in investigators.keys():
if k in ['SC_I','SC_II','IRBC']:
investigator = investigators.get(k)
if investigator.get('uid', None) != None:
if investigator['uid'] != current_user['uid']:
pcs[k] = investigator
cnt_pcs_uid = cnt_pcs_uid + 1
else:
is_cu_pc = True
is_cu_pc_role = investigator['label']
else:
pcs[k] = investigator
cnt_pcs = len(pcs.keys())
if cnt_pcs != cnt_pcs_uid:
pcs_invalid_uid = True
else:
pcs_invalid_uid = False
if cnt_pcs > 0:
del(k)
del(investigator)
# Additional Coordinators
acs = {}
is_cu_ac = False
cnt_acs_uid = 0
for k in investigators.keys():
if k == 'AS_C':
investigator = investigators.get(k)
if investigator.get('uid', None) != None:
if investigator['uid'] != current_user['uid']:
acs[k] = investigator
cnt_acs_uid = cnt_acs_uid + 1
else:
is_cu_ac = True
is_cu_ac_role = investigator['label']
else:
acs[k] = investigator
cnt_acs = len(acs.keys())
if cnt_pcs != cnt_pcs_uid:
acs_invalid_uid = True
else:
acs_invalid_uid = False
if cnt_acs > 0:
del(k)
del(investigator)
# Sub-Investigatoers
subs = {}
is_cu_subs = False
cnt_subs_uid = 0
for k in investigators.keys():
if k[:2] == 'SI':
investigator = investigators.get(k)
if investigator.get('uid', None) != None:
if investigator['uid'] != current_user['uid']:
subs[k] = investigator
cnt_subs_uid = cnt_subs_uid + 1
else:
is_cu_subs = True
else:
subs[k] = investigator
cnt_subs = len(subs.keys())
if cnt_subs != cnt_subs_uid:
subs_invalid_uid = True
else:
subs_invalid_uid = False
if cnt_subs > 0:
del(k)
del(investigator)
# Additional Personnel
aps = {}
is_cu_ap = False
cnt_aps_uid = 0
for k in investigators.keys():
if k in ['SCI','DC']:
investigator = investigators.get(k)
if investigator.get('uid', None) != None:
if investigator['uid'] != current_user['uid']:
aps[k] = investigator
cnt_aps_uid = cnt_aps_uid + 1
else:
is_cu_ap = True
is_cu_ap_role = investigator['label']
else:
aps[k] = investigator
cnt_aps = len(aps.keys())
if cnt_aps != cnt_aps_uid:
aps_invalid_uid = True
else:
aps_invalid_uid = False
if cnt_aps > 0:
del(k)
del(investigator)
del(investigators)
temp
Flow_10zn0h1
Flow_0kp47dz
##### Please confirm Primary Investigator entered in Protocol Builder is correct and if so, provide additional information:
### **{{ pi.display_name }}**
***Email:*** {{ pi.email_address }}
**Primary Appointment**
***School:*** {{ pi.E0.schoolName }}
***Department:*** {{ pi.E0.deptName }}
{% if is_me_pi %}
Since you are the person entering this information, you already have access and will receive all emails.
{% endif %}
Flow_1kg5jot
Flow_1mplloa
Flow_1dcsioh
Flow_147b9li
Flow_00prawo
not(hasPI) or (hasPI and pi_invalid_uid)
No PI entered in PB
Flow_00prawo
Flow_16qr5jf
Flow_0kpe12r
Flow_1ayisx2
Flow_0xifvai
Flow_1oqem42
The following Primary Coordinators were entered in Protocol Builder:
{%+ for key, value in pcs.items() %}{{value.display_name}} ({{key}}){% if loop.index is lt cnt_pcs %}, {% endif %}{% endfor %}
To Save the current settings for all Primary Coordinators, select Save All.
Otherwise, edit each Coordinator as necessary and select the Save button for each.
### Please provide supplemental information for:
#### {{ pc.display_name }}
##### Title: {{ pc.title }}
##### Department: {{ pc.department }}
##### Affiliation: {{ pc.affiliation }}
Flow_0xifvai
Flow_1n0k4pd
cnt_pcs == 0
Flow_0tfprc8
Flow_0tsdclr
Flow_1grahhv
LDAP_dept = pi.department
length_LDAP_dept = len(LDAP_dept)
pi.E0 = {}
if length_LDAP_dept > 0:
E0_start = LDAP_dept.find("E0:") + 3
E0_slice = LDAP_dept[E0_start:length_LDAP_dept]
E0_first_hyphen = E0_slice.find("-")
E0_dept_start = E0_first_hyphen + 1
pi.E0.schoolAbbrv = E0_slice[0:E0_first_hyphen]
isSpace = " " in E0_slice
if isSpace:
E0_first_space = E0_slice.find(" ")
E0_spec_start = E0_first_space + 1
E0_spec_end = len(E0_slice)
pi.E0.deptAbbrv = E0_slice[E0_dept_start:E0_first_space]
pi.E0.specName = E0_slice[E0_spec_start:E0_spec_end]
else:
pi.E0.specName = ""
else:
pi.E0.schoolAbbrv = "Not in LDAP"
pi.E0.deptAbbrv = "Not in LDAP"
pi.E0.specName = "Not in LDAP"
The Study's Responsible Organization is needed in order to confirm the Department Chair. If it is the same as the Primary Investigator's Primary Department show below, we have all the information needed to determine the Department Chair.
**Primary Investigator's Primary Appointment**
***School:*** {{ pi.E0.schoolName }}
***Department:*** {{ pi.E0.deptName }}
Flow_0iuzu7j
Flow_0whqr3p
Flow_070j5fg
Flow_0vi6thu
Flow_00yhlrq
RO_Chair_CID == pi.uid
The PI is also the RO Chair
Flow_00yhlrq
Flow_0kpe12r
Flow_12ss6u8
Flow_0dt3pjw
Flow_05rqrlf
Flow_0jxzqw1
cnt_subs == 0
The following Sub-Investigators were entered in Protocol Builder:
{%+ for key, value in subs.items() %}{{value.display_name}} ({{key}}){% if loop.index is lt cnt_subs %}, {% endif %}{% endfor %}
To Save the current settings for all Sub-Investigators, select Save All.
Otherwise, edit each Sub-Investigator as necessary and select the Save button for each.
### Please provide supplemental information for:
#### {{ sub.display_name }}
##### Title: {{ sub.title }}
##### Department: {{ sub.department }}
##### Affiliation: {{ sub.affiliation }}
Flow_05rqrlf
Flow_0ofpgml
Please enter the Private Investigator in Protocol Builder.
Flow_16qr5jf
Flow_1grahhv
Flow_1kg5jot
pi.E0.schoolName = PI_E0_schoolName
pi.E0.deptName = PI_E0_deptName
pi_experience_key = "pi_experience_" + pi.user_id
pi.experience = user_data_get(pi_experience_key,"")
ro = {}
ro['chair'] = {}
Flow_1oo0ijr
Flow_070j5fg
ro.chair = {}
ro.chair.uid = RO_Chair_CID
ro.chair.name_degree = RO_Chair_Name_Degree
ro.chair.title = RO_Chair_Title
ro.chair.sig_block = RO_Chair_Sig_Block
Flow_1n0k4pd
Flow_1oqem42
Flow_1gtl2o3
Flow_0dt3pjw
The following Additional Coordinators were entered in Protocol Builder:
{%+ for key, value in acs.items() %}{{value.display_name}} ({{key}}){% if loop.index is lt cnt_acs %}, {% endif %}{% endfor %}
To Save the current settings for all Additional Coordinators, select Save All.
Otherwise, edit each Coordinator as necessary and select the Save button for each.
### Please provide supplemental information for:
#### {{ acs.display_name }}
##### Title: {{ acs.title }}
##### Department: {{ acs.department }}
##### Affiliation: {{ acs.affiliation }}
Flow_1gtl2o3
Flow_12ss6u8
cnt_acs == 0
Flow_1va8c15
Flow_1yd7kbi
Flow_0w4d2bz
Flow_1yd7kbi
Flow_13la8l3
Flow_0ycdxbl
PIsPrimaryDepartmentSameAsRO.value != "yes"
PIsPrimaryDepartmentSameAsRO.value == 'diffSchool'
Flow_0ycdxbl
Flow_1fj9iz0
sch_enum = []
if pi.E0.schoolAbbrv != "MD":
sch_enum_md = [
{
"value": "MD",
"label": "Medicine"
},
]
else:
sch_enum_md = []
if pi.E0.schoolAbbrv != "AS":
sch_enum_as = [
{
"value": "AS",
"label": "Arts & Science"
},
]
else:
sch_enum_as = []
if pi.E0.schoolAbbrv != "CU":
sch_enum_cu = [
{
"value": "CU",
"label": "Education"
},
]
else:
sch_enum_cu = []
if pi.E0.schoolAbbrv != "NR":
sch_enum_nr = [
{
"value": "NR",
"label": "Nursing"
},
]
else:
sch_enum_nr = []
sch_enum = sch_enum_md + sch_enum_as + sch_enum_cu + sch_enum_nr
del(sch_enum_md)
del(sch_enum_as)
del(sch_enum_cu)
del(sch_enum_nr)
Flow_1fj9iz0
Flow_1yz8k2a
Flow_13la8l3
Flow_0mdjaid
Flow_0fw4rck
Flow_1azfvtx
Flow_0giqf35
Flow_0iuzu7j
ro.schoolAbbrv not in ["MD", "AS", "CU"]
Flow_0whqr3p
Flow_0zc01f9
Flow_1vyg8ir
Flow_0m9peiz
Flow_0m9peiz
Flow_1vv63qa
if PIsPrimaryDepartmentSameAsRO.value == "diffSchool":
ro.schoolName = RO_StudySchool.label
ro.schoolAbbrv = RO_StudySchool.value
if PIsPrimaryDepartmentSameAsRO.value != "yes":
if ro.schoolAbbrv == "MD":
ro.deptName = RO_StudyDeptMedicine.label
ro.deptAbbrv = RO_StudyDeptMedicine.value
elif ro.schoolAbbrv == "AS":
ro.deptName = RO_StudyDeptArtsSciences.label
ro.deptAbbrv = RO_StudyDeptArtsSciences.value
elif ro.schoolAbbrv == "CU":
ro.deptName = RO_StudyDeptEducation.label
ro.deptAbbrv = RO_StudyDeptEducation.value
else:
ro.deptName = ""
ro.deptAbbrv = ""
The Study's Responsible Organization is needed in order to confirm the Department Chair. If it is the same as the Primary Investigator's Primary Department show below, we have all the information needed to determine the Department Chair.
**Primary Investigator's Primary Appointment**
***School:*** {{ pi.E0.schoolName }}
***Department:*** {{ pi.E0.deptName }}
Flow_1azfvtx
Flow_0zc01f9
Flow_1e0yt3v
Flow_0shnt6k
Flow_1va8c15
ro = {}
ro['schoolName'] = PI_E0_schoolName
ro['schoolAbbrv'] = pi.E0.schoolAbbrv
ro['deptName'] = pi.E0.deptName
ro['deptAbbrv'] = pi.E0.deptAbbrv
The Study's Responsible Organization is needed in order to confirm the Department Chair. If it is the same as the Primary Investigator's Primary Department show below, we have all the information needed to determine the Department Chair.
**Primary Investigator's Primary Appointment**
***School:*** {{ pi.E0.schoolName }}
***Department:*** {{ pi.E0.deptName }}
Flow_0giqf35
Flow_1vyg8ir
Flow_1yz8k2a
Flow_0mdjaid
ro.schoolName = RO_StudySchool.label
ro.schoolAbbrv = RO_StudySchool.value
ro.schoolAbbrv == "AS"
ro.schoolAbbrv == "CU"
Flow_1vv63qa
Flow_0fw4rck
Flow_0vff9k5
Flow_0ofpgml
Flow_0jxzqw1
Flow_0q56tn8
Flow_0kp47dz
cnt_aps == 0
The following Additional Personnel were entered in Protocol Builder:
{%+ for key, value in aps.items() %}{{value.display_name}} ({{key}}){% if loop.index is lt cnt_aps %}, {% endif %}{% endfor %}
To Save the current settings for all Additional Personnel, select Save All.
Otherwise, edit each Additional Personnel as necessary and select the Save button for each.
### Please provide supplemental information for:
#### {{ ap.display_name }}
##### Title: {{ ap.title }}
##### Department: {{ ap.department }}
##### Affiliation: {{ ap.affiliation }}
Flow_0q56tn8
Flow_10zn0h1
Flow_147b9li
Flow_0tfprc8
Flow_0nz62mu
dc_invalid_uid or pcs_invalid_uid or acs_invalid_uid or subs_invalid_uid or aps_invalid_uid
Select No if all displayed invalid Computing IDs do not need system access and/or receive emails. If they do, correct in Protocol Builder first and then select Yes.
{% if dc_invalid_uid %}
Department Chair
{{ dc.error }}
{% endif %}
{% if pcs_invalid_uid %}
Primary Coordinators
{% for k, pc in pcs.items() %}
{% if pc.get('uid', None) == None: %}
{{ pc.error }}
{% endif %}
{% endfor %}
{% endif %}
{% if acs_invalid_uid %}
Additional Coordinators
{% for k, ac in acs.items() %}
{% if ac.get('uid', None) == None: %}
{{ ac.error }}
{% endif %}
{% endfor %}
{% endif %}
{% if subs_invalid_uid %}
Sub-Investigators
{% for k, sub in subs.items() %}
{% if sub.get('uid', None) == None: %}
{{ sub.error }}
{% endif %}
{% endfor %}
{% endif %}
{% if aps_invalid_uid %}
Additional Personnnel
{% for k, ap in aps.items() %}
{% if ap.get('uid', None) == None: %}
{{ ap.error }}
{% endif %}
{% endfor %}
{% endif %}
Flow_0nz62mu
Flow_16bkbuc
Flow_16bkbuc
Flow_0tsdclr
Flow_1mtwuyq
not(FixInvalidUIDs)
***Name & Degree:*** {{ RO_Chair_Name_Degree }}
***School:*** {{ RO_School }}
***Department:*** {{ RO_Department }}
***Title:*** {{ RO_Chair_Title }}
***Email:*** {{ RO_Chair_CID }}
{% if RO_Chair_CID != dc.uid %}
*Does not match the Department Chair specified in Protocol Builder, {{ dc.display_name }}*
{% endif %}
Flow_0vi6thu
Flow_1ayisx2
Flow_07ur9cc
Flow_0shnt6k
user_data_set(pi_experience_key, pi.experience)
Flow_1mplloa
Flow_07ur9cc
Flow_1e0yt3v
pi.experience != user_data_get(pi_experience_key,"")
Flow_0vff9k5
Flow_0w4d2bz
Flow_1oo0ijr
Flow_1mtwuyq