nlpmed_portal.annotations.api.viewsets.projects module

class nlpmed_portal.annotations.api.viewsets.projects.ProjectViewSet[source]

Bases: BaseViewSet

queryset
permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'nlpmed_portal.annotations.permissions.MethodBasePermission'>]
required_perms = {'DELETE': 'delete_project', 'GET': 'view_project', 'HEAD': 'view_project', 'OPTIONS': 'view_project', 'PATCH': 'change_project', 'POST': 'add_project', 'PUT': 'change_project'}
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_object(*args, **kwargs)[source]

Returns the object the view is displaying.

You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.

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)

daterange(request, pk=None)[source]
meta(request)[source]
basename = None
description = None
detail = None
name = None
suffix = None
class nlpmed_portal.annotations.api.viewsets.projects.PatientViewSet[source]

Bases: BaseViewSet

serializer_class

alias of PatientSerializer

queryset
permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'nlpmed_portal.annotations.permissions.MethodBasePermission'>]
required_perms = {'DELETE': 'delete_patient', 'GET': 'view_patient', 'HEAD': 'view_patient', 'OPTIONS': 'view_patient', 'PATCH': 'change_patient', 'POST': 'add_patient', 'PUT': 'change_patient'}
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