Example #1
0
def submit_web(resouce_type, data, user):
    global test_resource
    test_resource = partial(Resource, owner_id=user.email)
    result = save_resource(resouce_type, data)
    assert result is not None
    commit_buffers(BUF)
    return result
Example #2
0
def init_superuser():
    superuser = User(email='super')
    db.session.add(superuser)
    global test_resource
    test_resource = partial(Resource, owner_id=superuser.email)


if __name__ == '__main__':
    from server import app
    with app.app_context():
        init_superuser()
        init_practitioner()
        init('Organization')
        init_conditions()
        patient_ids = []
        sequence_ids = []
        gene_names = []
        variant_ids = []

        for example_file in os.listdir(os.path.join(BASEDIR, 'examples/vcf')):
            load_vcf_example(os.path.join(BASEDIR, 'examples/vcf', example_file))
        sequence_amount = len(sequence_ids)


        for _ in xrange(10):
            patient = rand_patient()
            create_diagnosticreport(patient.get_reference())

        commit_buffers(BUF)
Example #3
0
def submit_web(resouce_type, data, user):
    global test_resource
    test_resource = partial(Resource, owner_id=user.email)
    save_resource(resouce_type, data)
    commit_buffers(BUF)
Example #4
0
def submit_web(resouce_type, data, user):
    global test_resource
    test_resource = partial(Resource, owner_id=user.email)
    save_resource(resouce_type, data)
    commit_buffers(BUF)