models.py

Appointments can be requested by a patient during filling in the questionnaires or by a healthprofessional.

The appointment is created by a secretary and coupled to a healthprofessional. The patient is automatically notified when the appointment has been created.

Class definitions:

class apps.appointment.models.Appointment(*args, **kwargs)[source]

Bases: core.models.AuditBaseModel

An appointment is coupled to a questionnaire_request which couples it to a patient. The appointment is created by a secretary and takes place with a healthprofessional.

Parameters:
  • id (AutoField) –
  • questionnaire_request_id (ForeignKey to QuestionnaireRequest) –
  • created_by_id (ForeignKey to Secretary) –
  • created_on (DateField) –
  • appointment_date (DateField) –
  • appointment_hour (CharField) – choices=[01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
  • appointment_minute (CharField) – choices=[00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55]
  • appointment_healthprofessional_id (ForeignKey to HealthProfessional) –
get_day

Returns te day of the week (monday, tuesday, etc)