furher shorts improvements
This commit is contained in:
+2
-12
@@ -52,6 +52,7 @@ from generic.models import (
|
||||
Examination,
|
||||
# Condition,
|
||||
ExamBase,
|
||||
FindingBase,
|
||||
Plane,
|
||||
Contrast,
|
||||
QuestionNote,
|
||||
@@ -600,29 +601,18 @@ class SeriesImage(SeriesImageBase):
|
||||
# }}
|
||||
|
||||
|
||||
class SeriesFinding(models.Model):
|
||||
class SeriesFinding(FindingBase):
|
||||
series = models.ForeignKey(
|
||||
"Series", related_name="findings", on_delete=models.SET_NULL, null=True
|
||||
)
|
||||
description = models.TextField(
|
||||
null=True, blank=True, help_text="Findings on the series / stack"
|
||||
)
|
||||
findings = models.ManyToManyField(Finding, blank=True)
|
||||
structures = models.ManyToManyField(Structure, blank=True)
|
||||
conditions = models.ManyToManyField(Condition, blank=True)
|
||||
annotation_json = models.TextField(null=True, blank=True)
|
||||
viewport_json = models.TextField(null=True, blank=True)
|
||||
# This has been migrated to install the image id (not index)
|
||||
current_image_id_index = models.TextField(null=True, blank=True)
|
||||
|
||||
def __str__(self) -> str:
|
||||
findings = self.findings.all().values_list("name")
|
||||
return f"SeriesFinding: {self.series.id}/{findings}/{self.description}"
|
||||
|
||||
def annotation_as_string(self) -> str:
|
||||
return json.dumps(self.annotation_json)
|
||||
|
||||
|
||||
@reversion.register
|
||||
class Series(SeriesBase):
|
||||
modality = models.ForeignKey(
|
||||
|
||||
Reference in New Issue
Block a user