Add 'sponsors' to study_info call

This commit is contained in:
Kelly McDonald 2020-11-04 14:34:10 -05:00
parent b2aede2b8d
commit 2931f45187
2 changed files with 4 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class StudyInfo(Script):
"""Please see the detailed description that is provided below. """ """Please see the detailed description that is provided below. """
pb = ProtocolBuilderService() pb = ProtocolBuilderService()
type_options = ['info', 'investigators', 'roles', 'details', 'approvals', 'documents', 'protocol'] type_options = ['info', 'investigators', 'roles', 'details', 'approvals', 'documents', 'protocol','sponsors']
# This is used for test/workflow validation, as well as documentation. # This is used for test/workflow validation, as well as documentation.
example_data = { example_data = {
@ -345,6 +345,8 @@ Returns information specific to the protocol.
retval = StudyService().get_investigators(study_id, all=True) retval = StudyService().get_investigators(study_id, all=True)
if cmd == 'details': if cmd == 'details':
retval = self.pb.get_study_details(study_id) retval = self.pb.get_study_details(study_id)
if cmd == 'sponsors':
retval = self.pb.get_sponsors(study_id)
if cmd == 'approvals': if cmd == 'approvals':
retval = StudyService().get_approvals(study_id) retval = StudyService().get_approvals(study_id)
if cmd == 'documents': if cmd == 'documents':

View File

@ -13,7 +13,7 @@ class ProtocolBuilderService(object):
INVESTIGATOR_URL = app.config['PB_INVESTIGATORS_URL'] INVESTIGATOR_URL = app.config['PB_INVESTIGATORS_URL']
REQUIRED_DOCS_URL = app.config['PB_REQUIRED_DOCS_URL'] REQUIRED_DOCS_URL = app.config['PB_REQUIRED_DOCS_URL']
STUDY_DETAILS_URL = app.config['PB_STUDY_DETAILS_URL'] STUDY_DETAILS_URL = app.config['PB_STUDY_DETAILS_URL']
SPONSORS_URL = app.config['PB_STUDY_DETAILS_URL'] SPONSORS_URL = app.config['PB_SPONSORS_URL']
@staticmethod @staticmethod
def is_enabled(): def is_enabled():