models.py¶
Module which defines the Report model.
Class definitions:
-
class
apps.report.models.Report(*args, **kwargs)[source]¶ Bases:
core.models.AuditBaseModelModel for saving reports of filled in questionnaires. Standard templates are used to generate the report which can be edited by the healthprofessional.
The report is encrypted with use of the personal key of the created_by healthprofessional
Parameters: - id (AutoField) –
- questionnaire_request_id (ForeignKey to
QuestionnaireRequest) – - created_by_id (ForeignKey to
HealthProfessional) – - created_on (DateField) –
- finished_on (DateField) –
- invalid (BooleanField) –
- sent_to_doctor (BooleanField) –
- patient_needs_appointment (BooleanField) –
- report (
EncryptedTextField) –
-
filled_in¶ - Returns:
- True if finished_on is set
-
audit_encryption_key_id¶ Get the EncryptionKey id so it can be coupled to the log item in the audit.
- Returns:
- The id of the EncryptionKey that is used to encrypt the model instance.