views.py

This module contains the class based views and functions for messages.

Class and function definitions:

apps.rcmessages.views.remove_not_handled_messages(rc_messages)[source]

Function which removes messages that are coupled to a questionnaire which is not finished by a healthprofessional

Args:
  • rc_messages: list of RCMessage instances to strip
Returns:
list of RCMessage instances
apps.rcmessages.views.get_all_messages_for_secretary(secretary)[source]
Args:
  • secretary: the secretary to get all messages for
Returns:
all messages for a secretary
apps.rcmessages.views.get_all_messages_for_healthprofessional(healthprofessional)[source]
Args:
  • healthprofessional: the healthprofessional to get all messages for
Returns:
all messages for a healthprofessional
apps.rcmessages.views.get_all_messages_for_patient(patient)[source]
Args:
  • patient: the patient to get all messages for
Returns:
all messages for a patient
class apps.rcmessages.views.MessageAdd(**kwargs)[source]

Bases: apps.healthperson.patient.views.PatientBaseView, core.views.FormView

Class based view for adding a new message by a secretary or healthprofessional

form_class

alias of MessageAddForm

class apps.rcmessages.views.SentMessageSearch(**kwargs)[source]

Bases: core.views.FormView

Search through sent messages either as an healthprofessional or secretary

form_class

alias of MessageSearchForm

get_context_data(**kwargs)[source]

Return the found patients in a context

class apps.rcmessages.views.MessageSent(**kwargs)[source]

Bases: apps.healthperson.patient.views.PatientBaseView, django.views.generic.base.TemplateView

Shows a confirmation message that the message has been sent.

class apps.rcmessages.views.SentMessageOverview(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

Generates an overview of all sent messages of either a healthprofessional or secretary when there are no messages, otherwise the sentmessagedetails view is used.

class apps.rcmessages.views.SentMessageDetails(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

Shows the contents of a sent message

class apps.rcmessages.views.MessageOverview(**kwargs)[source]

Bases: apps.healthperson.patient.views.PatientBaseView, django.views.generic.base.TemplateView

Shows an overview of all messages of a patient

class apps.rcmessages.views.MessageDetails(**kwargs)[source]

Bases: apps.healthperson.patient.views.PatientBaseView, django.views.generic.base.TemplateView

Shows the contents of a message to a patient