class documentation

Model to describe a patient's tumor in detail.

It is connected to a patient via a django.db.models.ForeignKey relation.

Class Locations The primary tumor locations in the head and neck region.
Method __str__ Report some main characteristics.
Method delete Upon deletion, update the patient's T-stage.
Method save Before creating the database entry, determine the location of the tumor from the specified subsite and update the patient it is assigned to, to the correct T-stage.
Constant SUBSITE_DICT Undocumented
Constant SUBSITE_LIST Undocumented
Constant SUBSITES List of subsites with their ICD-10 code and respective description, grouped by location.
Class Variable central Is the tumor symmetric w.r.t. the patients mid-sagittal line?
Class Variable extension Does the tumor cross the mid-sagittal line of the patient?
Class Variable patient This defines the connection to the Patient model.
Class Variable stage_prefix 'c' for 'clinical' and 'p' for 'pathological'.
Class Variable subsite The subsite is a more granular categorization by the anatomical region of the head and neck where the primary tumor occurs in. It is usually encoded using the ICD-10 codes.
Class Variable t_stage Stage of the primary tumor. Categorized the tumor by size and infiltration of tissue types.
Class Variable volume Volume of the patient's tumor.
Instance Variable location The tumor location.

Inherited from LockedDatasetMixin:

Property _must_raise Infer from class if an error should be raised on save/delete.
def __str__(self):

Report some main characteristics.

def delete(self, *args, **kwargs):

Upon deletion, update the patient's T-stage.

def save(self, *args, **kwargs):

Before creating the database entry, determine the location of the tumor from the specified subsite and update the patient it is assigned to, to the correct T-stage.

SUBSITE_DICT: dict =

Undocumented

Value
{'base': ['C01', 'C01.9'],
 'tonsil': ['C09', 'C09.0', 'C09.1', 'C09.8', 'C09.9'],
 'rest_oro': ['C10',
              'C10.0',
              'C10.1',
              'C10.2',
              'C10.3',
...
SUBSITE_LIST =

Undocumented

Value
[icd for icd_list in SUBSITE_DICT.values() for icd in icd_list]
SUBSITES: list[tuple] =

List of subsites with their ICD-10 code and respective description, grouped by location.

Value
[('oral cavity',
  (('C02', 'other parts of tongue'),
   ('C02.0', 'dorsal surface of tongue'),
   ('C02.1', 'border of tongue'),
   ('C02.2', 'ventral surface of tongue'),
   ('C02.3', 'anterior two thirds of tongue'),
   ('C02.4', 'lingual tonsil'),
...
central =

Is the tumor symmetric w.r.t. the patients mid-sagittal line?

extension =

Does the tumor cross the mid-sagittal line of the patient?

patient =

This defines the connection to the Patient model.

stage_prefix =

'c' for 'clinical' and 'p' for 'pathological'.

subsite =

The subsite is a more granular categorization by the anatomical region of the head and neck where the primary tumor occurs in. It is usually encoded using the ICD-10 codes.

t_stage =

Stage of the primary tumor. Categorized the tumor by size and infiltration of tissue types.

volume =

Volume of the patient's tumor.

location =

The tumor location.