api/participant_administration.py
def create_many_patients(study_id=None):
    """ Creates a number of new users at once for a study.  Generates a password and keys for
    each one, pushes data to S3 and the user database, adds users to the study they're supposed
    to be attached to, and returns a CSV file for download with a mapping of Patient IDs and
    passwords. """
    number_of_new_patients = int(request.form.get('number_of_new_patients', 0))
    desired_filename = request.form.get('desired_filename', '')
    filename_spaces_to_underscores = sub(r'[\ =]', '_', desired_filename)
    filename = sub(r'[^a-zA-Z0-9_\.=]', '', filename_spaces_to_underscores)
    if not filename.endswith('.csv'):
        filename += ".csv"
    return Response(participant_csv_generator(study_id, number_of_new_patients),
                    mimetype="csv",
                    headers={'Content-Disposition': 'attachment; filename="%s"' % filename})
 Creates a number of new users at once for a study.  Generates a password and keys for
    each one, pushes data to S3 and the user database, adds users to the study they're supposed
    to be attached to, and returns a CSV file for download with a mapping of Patient IDs and
    passwords. 
Creates a number of new users at once for a study.  Generates a password and keys for
each one, pushes data to S3 and the user database, adds users to the study they're supposed
to be attached to, and returns a CSV file for download with a mapping of Patient IDs and
passwords.
Creates a number of new users at once for a study . Generates a password and keys for each one pushes data to S3 and the user database adds users to the study they ' re supposed to be attached to and returns a CSV file for download with a mapping of Patient IDs and passwords .
def create_many_patients(study_id=None):
    number_of_new_patients = int(request.form.get('number_of_new_patients', 0))
    desired_filename = request.form.get('desired_filename', '')
    filename_spaces_to_underscores = sub(r'[\ =]', '_', desired_filename)
    filename = sub(r'[^a-zA-Z0-9_\.=]', '', filename_spaces_to_underscores)
    if not filename.endswith('.csv'):
        filename += ".csv"
    return Response(participant_csv_generator(study_id, number_of_new_patients),
                    mimetype="csv",
                    headers={'Content-Disposition': 'attachment; filename="%s"' % filename})
def create_many_patients ( study_id = None ) : number_of_new_patients = int ( request . form . get ( 'number_of_new_patients' , 0 ) ) desired_filename = request . form . get ( 'desired_filename' , '' ) filename_spaces_to_underscores = sub ( r'[\ =]' , '_' , desired_filename ) filename = sub ( r'[^a-zA-Z0-9_\.=]' , '' , filename_spaces_to_underscores ) if not filename . endswith ( '.csv' ) : filename += ".csv" return Response ( participant_csv_generator ( study_id , number_of_new_patients ) , mimetype = "csv" , headers = { 'Content-Disposition' : 'attachment; filename="%s"' % filename } )
Creates a number of new users at once for a study.
Creates a number of new users at once for a study .
""" Creates a number of new users at once for a study.  Generates a password and keys for
    each one, pushes data to S3 and the user database, adds users to the study they're supposed
    to be attached to, and returns a CSV file for download with a mapping of Patient IDs and
    passwords. """
study_id