def create_studies(study_settings):
    """
        Create Study entries in the database for the supplied study_settings
    """
    try:
        study = Study.objects.get(name=study_settings.name)
    except Study.DoesNotExist:
        study = Study(name=study_settings.name)
    
    study.stub = study_settings.name_stub
    study.description = study_settings.description
    #study.start_date = Date
    #study.end_date = Date
    study.started = True
    study.consent = study_settings.informed_consent
    study.instructions = study_settings.instructions
    study.eligibility = study_settings.eligibility
    study.reward = study_settings.reward
    study.task_session_dur = 1
    study.assess_blocks = 1
    study.assess_trials = 1
    
    study.save()
    
    return study