scout/server/blueprints/variants/views.py
def clinvar(institute_id, case_name, variant_id):
    """Build a clinVar submission form for a variant."""
    data = controllers.clinvar_export(store, institute_id, case_name, variant_id)
    if request.method == 'GET':
        return data
    else: #POST
        form_dict = request.form.to_dict()
        submission_objects = set_submission_objects(form_dict) # A tuple of submission objects (variants and casedata objects)

        # Add submission data to an open clinvar submission object,
        # or create a new if no open submission is found in database
        open_submission = store.get_open_clinvar_submission(current_user.email, institute_id)
        updated_submission = store.add_to_submission(open_submission['_id'], submission_objects)

        # Redirect to clinvar submissions handling page, and pass it the updated_submission_object
        return redirect(url_for('cases.clinvar_submissions', institute_id=institute_id))
def clinvar(institute_id, case_name, variant_id):
    data = controllers.clinvar_export(store, institute_id, case_name, variant_id)
    if request.method == 'GET':
        return data
    else: #POST
        form_dict = request.form.to_dict()
        submission_objects = set_submission_objects(form_dict) # A tuple of submission objects (variants and casedata objects)

        # Add submission data to an open clinvar submission object,
        # or create a new if no open submission is found in database
        open_submission = store.get_open_clinvar_submission(current_user.email, institute_id)
        updated_submission = store.add_to_submission(open_submission['_id'], submission_objects)

        # Redirect to clinvar submissions handling page, and pass it the updated_submission_object
        return redirect(url_for('cases.clinvar_submissions', institute_id=institute_id))
def clinvar ( institute_id , case_name , variant_id ) : data = controllers . clinvar_export ( store , institute_id , case_name , variant_id ) if request . method == 'GET' : return data else : #POST form_dict = request . form . to_dict ( ) submission_objects = set_submission_objects ( form_dict ) # A tuple of submission objects (variants and casedata objects) # Add submission data to an open clinvar submission object, # or create a new if no open submission is found in database open_submission = store . get_open_clinvar_submission ( current_user . email , institute_id ) updated_submission = store . add_to_submission ( open_submission [ '_id' ] , submission_objects ) # Redirect to clinvar submissions handling page, and pass it the updated_submission_object return redirect ( url_for ( 'cases.clinvar_submissions' , institute_id = institute_id ) )
Build a clinVar submission form for a variant.
Build a clinVar submission form for a variant .