views.py

A secretary can add/edit/remove patients and make appointments. This module contains the views needed to perform those functions.

Class definitions:

class apps.healthperson.secretariat.views.SecretaryBaseView(**kwargs)[source]

Bases: django.views.generic.base.View

Base view which adds the secretary by using the secretary_session_id or logged in user

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

Add secretary to the view class

get_context_data(**kwargs)[source]

Base context, include the secretary by default

class apps.healthperson.secretariat.views.SecretaryIndexView(**kwargs)[source]

Bases: apps.base.views.BaseIndexTemplateView, apps.healthperson.secretariat.views.SecretaryBaseView

Class based view for secretary homepage

class apps.healthperson.secretariat.views.SecretariatSearchView(**kwargs)[source]

Bases: core.views.FormView

Search secretary view page used by manager

form_class

alias of SecretarySearchForm

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 secretary

class apps.healthperson.secretariat.views.SearchView(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

Generic search page as available in the homepage can be used by a secretary or manager (second is not used)

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

Search for patients

class apps.healthperson.secretariat.views.SecretariatAddView(**kwargs)[source]

Bases: apps.healthperson.views.BaseAddView

Class based view for adding a new secretary used by a manager

form_class

alias of SecretaryAddForm

class apps.healthperson.secretariat.views.SecretariatPersonaliaView(**kwargs)[source]

Bases: apps.healthperson.secretariat.views.SecretaryBaseView, django.views.generic.base.TemplateView

Class based view for showing secretary personalia used by the manager and secretary

class apps.healthperson.secretariat.views.SecretariatPersonaliaEdit(**kwargs)[source]

Bases: apps.healthperson.secretariat.views.SecretaryBaseView, core.views.FormView

Class based view for editing secretary personalia used by a manager and secretary

form_class

alias of SecretaryEditForm

form_valid(form)[source]

Save the person and secretary information

class apps.healthperson.secretariat.views.SecretariatRemove(**kwargs)[source]

Bases: apps.healthperson.secretariat.views.SecretaryBaseView, django.views.generic.base.TemplateView

Remove a secretary, sets the user deleted_on date and is_active to False

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

Remove the secretary by setting the user to inactive