Beispiel #1
0
def handle_resource(resource_type):

    if resource_type == 'metadata':
        return redirect("/static/doc/metadata")

    if resource_type in [
            'callsets', 'variantsets', 'readgroupsets', 'referencesets',
            'variant'
    ]:
        if request.method == 'GET':
            return ga4gh.api.ga_handle_search(request, resource_type)
    elif resource_type in [
            'variantset', 'genomes', 'files', 'runs', 'genomes'
    ]:
        if request.method == 'GET':
            return basespace.api.bs_handle_search(request, resource_type)
    elif resource_type in RESOURCES:
        if request.method == 'GET':
            return ttam.api.ttam_handle_search(request, resource_type)
    else:
        return fhir_error.inform_not_found()

    g.api_base = request.api_base = util.get_api_base()
    fhir_request = fhir_api.FHIRRequest(request)

    if request.method == 'GET':
        return fhir_api.handle_search(fhir_request, resource_type)
    else:
        return fhir_api.handle_create(fhir_request, resource_type)
Beispiel #2
0
def handle_resource(resource_type):
    if resource_type not in RESOURCES:
        return fhir_error.inform_not_found()

    g.api_base = request.api_base = util.get_api_base()
    fhir_request = fhir_api.FHIRRequest(request)

    if request.method == 'GET':
        return fhir_api.handle_search(fhir_request, resource_type)
    else:
        return fhir_api.handle_create(fhir_request, resource_type)
Beispiel #3
0
def handle_resource(resource_type):
    if resource_type not in RESOURCES:
        return fhir_error.inform_not_found()

    g.api_base = request.api_base = util.get_api_base()
    fhir_request = fhir_api.FHIRRequest(request)

    if request.method == "GET":
        return fhir_api.handle_search(fhir_request, resource_type)
    else:
        return fhir_api.handle_create(fhir_request, resource_type)
Beispiel #4
0
def handle_resource(resource_type):
    if resource_type in ['callsets', 'variantsets', 'readgroupsets', 'referencesets', 'variant']:
        if request.method == 'GET':
            return ga4gh.api.ga_handle_search(request, resource_type)

    if resource_type not in RESOURCES:
        return fhir_error.inform_not_found()

    g.api_base = request.api_base = util.get_api_base() 
    fhir_request = fhir_api.FHIRRequest(request)

    if request.method == 'GET':
        return fhir_api.handle_search(fhir_request, resource_type)
    else:
        return fhir_api.handle_create(fhir_request, resource_type)
Beispiel #5
0
def handle_resource(resource_type):
    if resource_type in [
            'callsets', 'variantsets', 'readgroupsets', 'referencesets',
            'variant'
    ]:
        if request.method == 'GET':
            return ga4gh.api.ga_handle_search(request, resource_type)

    if resource_type not in RESOURCES:
        return fhir_error.inform_not_found()

    g.api_base = request.api_base = util.get_api_base()
    fhir_request = fhir_api.FHIRRequest(request)

    if request.method == 'GET':
        return fhir_api.handle_search(fhir_request, resource_type)
    else:
        return fhir_api.handle_create(fhir_request, resource_type)
Beispiel #6
0
def handle_resource(resource_type):

    if resource_type == 'metadata':
        return redirect("/static/doc/metadata")

    if resource_type in ['callsets', 'variantsets', 'readgroupsets', 'referencesets', 'variant']:
        if request.method == 'GET':
            return ga4gh.api.ga_handle_search(request, resource_type)
    elif resource_type in ['variantset', 'genomes', 'files', 'runs', 'genomes']:
        if request.method == 'GET':
            return basespace.api.bs_handle_search(request, resource_type)
    elif resource_type in RESOURCES:
        if request.method == 'GET':
            return ttam.api.ttam_handle_search(request, resource_type)
    else:
        return fhir_error.inform_not_found()

    g.api_base = request.api_base = util.get_api_base() 
    fhir_request = fhir_api.FHIRRequest(request)

    if request.method == 'GET':
        return fhir_api.handle_search(fhir_request, resource_type)
    else:
        return fhir_api.handle_create(fhir_request, resource_type)