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}
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}