nlpmed_portal.annotations.api.viewsets.annotations module

class nlpmed_portal.annotations.api.viewsets.annotations.PatientAnnotationViewSet[source]

Bases: BaseViewSet

queryset
permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'nlpmed_portal.annotations.permissions.MethodBasePermission'>]
required_perms = {'DELETE': 'delete_patientannotation', 'GET': 'view_patientannotation', 'HEAD': 'view_patientannotation', 'OPTIONS': 'view_patientannotation', 'PATCH': 'change_patientannotation', 'POST': 'add_patientannotation', 'PUT': 'change_patientannotation'}
get_serializer_class()[source]

Return the class to use for the serializer. Defaults to using self.serializer_class.

You may want to override this if you need to provide different serializations depending on the incoming request.

(Eg. admins get full serialization, others get basic serialization)

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

destroy(request, *args, **kwargs)[source]
meta(request)[source]
delete_all(request, *args, **kwargs)[source]
basename = None
description = None
detail = None
name = None
suffix = None
class nlpmed_portal.annotations.api.viewsets.annotations.NERAnnotationViewSet[source]

Bases: BaseViewSet

queryset
serializer_class

alias of NERAnnotationSerializer

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'nlpmed_portal.annotations.permissions.MethodBasePermission'>]
required_perms = {'DELETE': 'delete_nerannotation', 'GET': 'view_nerannotation', 'HEAD': 'view_nerannotation', 'OPTIONS': 'view_nerannotation', 'PATCH': 'change_nerannotation', 'POST': 'add_nerannotation', 'PUT': 'change_nerannotation'}
get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

delete_all(request, *args, **kwargs)[source]
meta(request)[source]
basename = None
description = None
detail = None
name = None
suffix = None