package documentation
The patients
app manages the database and its access. It allows the user
to create, edit and delete new entries in the database and ensures that it is
always consistent.
In short, there are four django models that make up the patient-related part of the database:
- A dataset (
patients.models.Dataset
) of patients (no. 2 below). This model interfaces with the CSV table format of LyProX, decides which user can see which patients in the list and dashboard as well as ensures the integrity of the database. The latter means it e.g. notices if a CSV file that was used to batch-import a number of patients into the database has been changed after that import. Something like this would compromise the trustworthiness of the interface. - The patient itself (
patients.models.Patient
), storing basic and demographic data about a patient with a squamous cell carcinoma in the head and neck region - A squamous cell carcinoma (
patients.models.Tumor
). This model contains specific information about a patient's tumor. Tumors always belong to a patient. - Diagnoses of the lymphatic system (
patients.models.Diagnose
). This model stores which diagnostic modality was used to diagnose the lymphatic involvement of the patient and which lymph node levels where diagnosed to be healthy, metastatic or unkown
The app also contains an methods for importing and exporting a database from and to a CSV table. The format of CSV tables is what we chose to publish our lymphatic progression patterns in.
Module | fields |
Here we define custom model fields that add some functionality to the existing Django model fields. |
Module | filters |
This module defines a django_filters.FilterSet based class that allows relatively easy filtering and sorting of models. In our case, we have implemented only a PatientFilter for the views.PatientListView... |
Module | forms |
This module defines django.forms.ModelForms for the creation and deletion of the models defined in patients.models. Generally, forms are used to capture user input in django and are rendered out by views into HTML elements. |
Module | ioports |
Module for importing and exporting CSV tables of patients with lymphatic patterns of progression into and from the Django database. |
Module | mixins |
Here we define some mixins that add functionality to the patient-related objects. So far, this consists only of a mixin that blocks saving or deleting a Patient , Tumor or Diagnose if the associated Dataset ... |
Module | models |
This module defines how patient related models work and how they interact with each other. Currently, four models are implemented: The Dataset , Patient , Tumor and the Diagnose . A Dataset groups Patient ... |
Module | urls |
Define the URLs that are available under https://lyprox.org/patients and which of the patients.views should be called when they are requested. |
Module | views |
Here, the generic views from django.views.generic are implemented for the patients.models. |