Пример #1
0
def oauth_update(request, resource_type, id):
    if request.method == "PUT":
        return update(request, resource_type)
    elif request.method == "GET":
        return read(request, resource_type, id)
    if settings.DEBUG:
        print("fhir/oauth2/update: Passed protected_resource check:", request, resource_type, id)
    return HttpResponse(status=501)
Пример #2
0
def oauth_update(request, resource_type, id):
    if request.method == "PUT":
        return update(request, resource_type)
    elif request.method == "GET":
        return read(request, resource_type, id)
    if settings.DEBUG:
        print("fhir/oauth2/update: Passed protected_resource check:", request, resource_type, id)
    return HttpResponse(status=501)
Пример #3
0
def read_or_update_or_delete(request, resource_type, id):
    """Route to read, update, or delete based on HTTP method FHIR Interaction"""

    if request.method == 'GET':
        # Read
        return read(request, resource_type, id)
    elif request.method == 'PUT':
        # update
        return update(request, resource_type, id)
    elif request.method == 'DELETE':
        # delete
        return delete(request, resource_type, id)
    #else:
    # Not supported.
    msg = "HTTP method %s not supported at this URL." % (request.method)
    return kickout_400(msg)
Пример #4
0
def oauth_view(request, resource_type):
    if request.method == "GET":
        return read(request, resource_type)
    return HttpResponse(status=501)
Пример #5
0
def oauth_view(request, resource_type):
    if request.method == "GET":
        return read(request, resource_type)
    return HttpResponse(status=501)