views.py

This module contains the views for displaying filled in questionnaires and the start and finish questionnaire views.

The questionnaire fillin process is handled by the apps.questionnaire.wizards.QuestionnaireWizard view.

Class and function definitions:

apps.questionnaire.views.insert_new_questionnaire_request_for_patient(patient)[source]

Adds a new questionnaire request for a patient including the requeststeps

Args:
  • patient: the patient to add the questionnaire_request for
Returns:
The created questionnaire_request
class apps.questionnaire.views.PatientView(**kwargs)[source]

Bases: django.views.generic.base.View

Basic patient view which checks if the user has logged in and automatically sets the patient on the view

set_patient(**kwargs)[source]

Sets the patient on the view

class apps.questionnaire.views.PatientTemplateView(**kwargs)[source]

Bases: apps.questionnaire.views.PatientView, django.views.generic.base.TemplateView

Templateview baseclass view

class apps.questionnaire.views.PatientQuestionnaireTemplateView(**kwargs)[source]

Bases: apps.questionnaire.views.PatientView, django.views.generic.base.TemplateView

Base view for all questionnaire views that use templateview. Sets the questionnaire_request on the view

class apps.questionnaire.views.BaseOverviewTemplateView(**kwargs)[source]

Bases: apps.questionnaire.views.PatientTemplateView

Base view for overview views that show the details pages for filled in questionnaires Automatically adds the context.

get_questionnaires_for(selected_model_class, selected_questionnaire_request)[source]

Retrieve the questionnaires coupled to the selected_questionnaire_request for the selected_model_class

Args:
  • selected_model_class: the model_class to find the questionnaire for
  • selected_questionnaire_request: the questionnaire_request which should be coupled to the questionnaires.
Returns:
[The selected questionnaire, list of questionnaires]
get_context()[source]

Creates the context based on the questionnaire request and model_display_name adding various information.

Returns:
The context dict
class apps.questionnaire.views.DiseaseActivityOverview(**kwargs)[source]

Bases: apps.questionnaire.views.BaseOverviewTemplateView

Shows the disease activity overview page

class apps.questionnaire.views.QualityOfLifeOverview(**kwargs)[source]

Bases: apps.questionnaire.views.BaseOverviewTemplateView

Shows the quality of life overview page

class apps.questionnaire.views.HealthcareQualityOverview(**kwargs)[source]

Bases: apps.questionnaire.views.BaseOverviewTemplateView

Shows the healthcare quality overview page

class apps.questionnaire.views.QuestionnaireStartControle(**kwargs)[source]

Bases: apps.questionnaire.views.PatientView

Start page for normal (non urgent) controls. The view checks if there is a partially filled in control and let’s the user finish it or redirects the user to the first step of the questionnaires fillin procedure.

class apps.questionnaire.views.QuestionnaireStartUrgent(**kwargs)[source]

Bases: apps.questionnaire.views.PatientView

Start page for urgen controls. The view checks if there is a partially filled in control and let’s the user finish it or redirects the user to the first step of the questionnaires fillin procedure.

class apps.questionnaire.views.QuestionnaireFinishedView(**kwargs)[source]

Bases: apps.questionnaire.views.PatientQuestionnaireTemplateView

Shows a succesfully finished all questionnaires view. Is both used for urgent and non urgent controls.

class apps.questionnaire.views.QuestionnaireRequestRemove(**kwargs)[source]

Bases: apps.questionnaire.views.PatientView

View which allows to remove a questionnaire request. Used when canceling the control.