scout/server/blueprints/cases/views.py
def case_diagnosis(institute_id, case_name):
    """Add or remove a diagnosis for a case."""
    institute_obj, case_obj = institute_and_case(store, institute_id, case_name)
    user_obj = store.user(current_user.email)
    link = url_for('.case', institute_id=institute_id, case_name=case_name)
    level = 'phenotype' if 'phenotype' in request.form else 'gene'
    omim_id = request.form['omim_id']
    remove = True if request.args.get('remove') == 'yes' else False
    store.diagnose(institute_obj, case_obj, user_obj, link, level=level,
                   omim_id=omim_id, remove=remove)
    return redirect(request.referrer)
def case_diagnosis(institute_id, case_name):
    """Add or remove a diagnosis for a case."""
    institute_obj, case_obj = institute_and_case(store, institute_id, case_name)
    user_obj = store.user(current_user.email)
    link = url_for('.case', institute_id=institute_id, case_name=case_name)
    level = 'phenotype' if 'phenotype' in request.form else 'gene'
    omim_id = request.form['omim_id']
    remove = True if request.args.get('remove') == 'yes' else False
    store.diagnose(institute_obj, case_obj, user_obj, link, level=level,
                   omim_id=omim_id, remove=remove)
    return redirect(request.referrer)
def case_diagnosis ( institute_id , case_name ) : institute_obj , case_obj = institute_and_case ( store , institute_id , case_name ) user_obj = store . user ( current_user . email ) link = url_for ( '.case' , institute_id = institute_id , case_name = case_name ) level = 'phenotype' if 'phenotype' in request . form else 'gene' omim_id = request . form [ 'omim_id' ] remove = True if request . args . get ( 'remove' ) == 'yes' else False store . diagnose ( institute_obj , case_obj , user_obj , link , level = level , omim_id = omim_id , remove = remove ) return redirect ( request . referrer )
Add or remove a diagnosis for a case.
Add or remove a diagnosis for a case .