Skip to content

onconova.oncology.models.radiotherapy

Radiotherapy

Bases: BaseModel

Model representing a radiotherapy treatment administered to a patient.

Attributes:

Name Type Description
objects QueryablePropertiesManager

Custom manager for queryable properties.

case ForeignKey[PatientCase]

Reference to the patient case receiving radiotherapy.

period DateRangeField

Clinically-relevant period of radiotherapy administration.

duration AnnotationProperty

Duration of treatment, calculated from the period.

targeted_entities ManyToManyField[NeoplasticEntity]

Neoplastic entities targeted by the radiotherapy.

sessions PositiveIntegerField

Total number of radiotherapy sessions.

intent CharField

Treatment intent (curative or palliative).

termination_reason CodedConceptField[TerminationReason]

Reason for termination of radiotherapy.

therapy_line ForeignKey[TherapyLine]

Therapy line assignment for the radiotherapy.

description str

Human-readable summary of the radiotherapy, including therapy line, settings, and dosages.

case class-attribute instance-attribute

description property

duration class-attribute instance-attribute

intent class-attribute instance-attribute

objects class-attribute instance-attribute

period class-attribute instance-attribute

sessions class-attribute instance-attribute

targeted_entities class-attribute instance-attribute

termination_reason class-attribute instance-attribute

therapy_line class-attribute instance-attribute

assign_therapy_line()

Assigns therapy lines to the current case using the TherapyLine model.

This method calls the assign_therapy_lines class method of TherapyLine with the associated case, refreshes the instance from the database, and returns the updated instance.

Returns:

Type Description
Self

The updated instance after therapy lines have been assigned and refreshed.

Source code in onconova/oncology/models/radiotherapy.py
def assign_therapy_line(self):
    """
    Assigns therapy lines to the current case using the TherapyLine model.

    This method calls the `assign_therapy_lines` class method of `TherapyLine` 
    with the associated case, refreshes the instance from the database, 
    and returns the updated instance.

    Returns:
        (Self): The updated instance after therapy lines have been assigned and refreshed.
    """
    TherapyLine.assign_therapy_lines(self.case)
    self.refresh_from_db()
    return self

RadiotherapyDosage

Bases: BaseModel

Represents a dosage record for a radiotherapy treatment.

Attributes:

Name Type Description
radiotherapy ForeignKey[PatientCase]

Reference to the associated Radiotherapy instance.

fractions PositiveIntegerField

Total number of radiotherapy fractions delivered.

dose MeasurementField[RadiationDose]

Total radiation dose delivered over the full radiotherapy course.

irradiated_volume CodedConceptField[RadiotherapyTreatmentLocation]

Anatomical location of the irradiated volume.

irradiated_volume_morphology CodedConceptField[RadiotherapyVolumeType]

Morphology of the irradiated volume's anatomical location.

irradiated_volume_qualifier CodedConceptField[RadiotherapyTreatmentLocationQualifier]

Qualifier for the anatomical location of the irradiated volume.

description str

Human-readable summary of the dosage, including dose, fractions, and irradiated volume.

description property

dose class-attribute instance-attribute

fractions class-attribute instance-attribute

irradiated_volume class-attribute instance-attribute

irradiated_volume_morphology class-attribute instance-attribute

irradiated_volume_qualifier class-attribute instance-attribute

radiotherapy class-attribute instance-attribute

RadiotherapyIntentChoices

Bases: TextChoices

CURATIVE class-attribute instance-attribute

PALLIATIVE class-attribute instance-attribute

RadiotherapySetting

Bases: BaseModel

Represents a specific setting for a radiotherapy procedure, including its modality and technique.

Attributes:

Name Type Description
radiotherapy ForeignKey[PatientCase]

Reference to the associated Radiotherapy instance where this dosage was delivered.

modality CodedConceptField[RadiotherapyModality]

The modality of the radiotherapy procedure (e.g., external beam, brachytherapy).

technique CodedConceptField[RadiotherapyTechnique]

The technique used in the radiotherapy procedure.

description str

Returns a string representation combining modality and technique.

description property

modality class-attribute instance-attribute

radiotherapy class-attribute instance-attribute

technique class-attribute instance-attribute

runner