def get_trials(nct_list):
	""" Returns one or more trials, multiple NCTs can be separated by colon. """
	trials = []
	
	if nct_list:
		ncts = nct_list.split(':')
		found = Trial.retrieve(ncts)
		
		for trial in found:
			trials.append(trial.json(['keyword', 'brief_summary', 'location', 'phase', 'intervention', 'study_design', 'primary_outcome', 'overall_contact']))
	
	return {'trials': trials}
Exemple #2
0
def get_trials(nct_list):
    """ Returns one or more trials, multiple NCTs can be separated by colon. """
    trials = []

    if nct_list:
        ncts = nct_list.split(':')
        found = Trial.retrieve(ncts)

        for trial in found:
            trials.append(
                trial.json([
                    'keyword', 'brief_summary', 'location', 'phase',
                    'intervention', 'study_design', 'primary_outcome',
                    'overall_contact'
                ]))

    return {'trials': trials}