views.py

This module contains all the views which are used by the manager to add/edit healthprofessionals and the views used by the healthprofessional itselves.

Class definitions:

class apps.healthperson.healthprofessional.views.HealthProfessionalBaseView(**kwargs)[source]

Bases: django.views.generic.base.View

Base view which adds the healthprofessional by using the healthprofessional_session_id or logged in user

dispatch(*args, **kwargs)[source]

Adds healthprofessional to the view class

get_context_data(**kwargs)[source]

Base context, include the healthprofessional by default

class apps.healthperson.healthprofessional.views.HealthProfessionalIndexView(**kwargs)[source]

Bases: apps.base.views.BaseIndexTemplateView, apps.healthperson.healthprofessional.views.HealthProfessionalBaseView

This view shows the homepage of the healthprofessional

get_controles_for_healthprofessional(healthprofessional)[source]

Adds controles and urgent_patient_controles to the view so they can be shown in the overview.

Args:
  • healthprofessional: The healthprofessional to get all all controles for
class apps.healthperson.healthprofessional.views.SearchView(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

Generic search page as available in the homepage

dispatch(*args, **kwargs)[source]

Init default values to be used in the context

post(request, *args, **kwargs)[source]

Search for patients

get_context_data(**kwargs)[source]

Return the found patients in a context

class apps.healthperson.healthprofessional.views.HealthProfessionalCropPhoto(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, django.views.generic.base.TemplateView

View allows to crop the photo of the healthprofessional, if necessary.

class apps.healthperson.healthprofessional.views.HealthProfessionalEditPhoto(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, core.views.FormView

Add/edit or remove the photo of an healthprofessional

form_class

alias of HealthProfessionalPhotoForm

class apps.healthperson.healthprofessional.views.HealthProfessionalPhotoView(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, django.views.generic.base.TemplateView

Show photo of healthprofessional

class apps.healthperson.healthprofessional.views.HealthProfessionalNotificationView(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, django.views.generic.base.TemplateView

Show notification settings

class apps.healthperson.healthprofessional.views.HealthProfessionalOutOfOfficeView(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, django.views.generic.base.TemplateView

Show out of office settings

class apps.healthperson.healthprofessional.views.HealthProfessionalOutOfOfficeEdit(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, core.views.FormView

Edit the out of office settings for an healthprofessional.

These settings are used to configure an out of office period with a replacement.

form_class

alias of HealthProfessionalOutOfOfficeEditForm

class apps.healthperson.healthprofessional.views.HealthProfessionalNotificationEdit(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, core.views.FormView

Edit the notification settings for an healthprofessional.

These settings are used for sending notifications of unhandeld (urgent) controls.

form_class

alias of HealthProfessionalNotificationEditForm

class apps.healthperson.healthprofessional.views.HealthProfessionalPersonaliaView(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, django.views.generic.base.TemplateView

Shows the personalia of an healhtprofessional which is the information stored in the coupled apps.account.models.User instance.

class apps.healthperson.healthprofessional.views.HealthProfessionalSetPassword(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, core.views.FormView

Displays a form to set a password. Used to initialize password for an healthprofessional

form_class

alias of SetPasswordForm

class apps.healthperson.healthprofessional.views.HealthProfessionalPersonaliaEdit(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, core.views.FormView

Edit the personalia of an healhtprofessional which is the information stored in the coupled apps.account.models.User instance.

form_class

alias of HealthProfessionalEditForm

class apps.healthperson.healthprofessional.views.HealthProfessionalSearchView(**kwargs)[source]

Bases: core.views.FormView

Search for an healthprofessional as a manager

form_class

alias of HealthProfessionalSearchForm

get_context_data(**kwargs)[source]

Add the search results to the context

get_initial()[source]

Get initial data, used for showing the old results and form data when the user uses the back button to return to the form

get(request, *args, **kwargs)[source]

Re-execute the search if the user has used the back button

form_valid(form)[source]

Perform the search action, search for a healthprofessional

class apps.healthperson.healthprofessional.views.HealthProfessionalAddView(**kwargs)[source]

Bases: apps.healthperson.views.BaseAddView

Class based view for adding a new healthprofessional

form_class

alias of HealthProfessionalAddForm

class apps.healthperson.healthprofessional.views.HealthProfessionalRemove(**kwargs)[source]

Bases: apps.healthperson.healthprofessional.views.HealthProfessionalBaseView, django.views.generic.base.TemplateView

Remove the healthprofessional by setting the deleted_on attribute on the coupled apps.account.models.User instance.

post(request, *args, **kwargs)[source]

Remove the healthprofessional by setting the user to inactive