def get_all_participants_in_dw_study(dw, study_id):
    """
    return all local participant ids for a study
    :param dw: data warehouse end point
    :param study_id: study id in dw
    :return: list of local participant ids
    """
    participants = dw.get_participants(study_id)
    local_participant_ids = []
    for p in participants:
        local_participant_ids = [p[1]] + local_participant_ids
    return local_participant_ids