add field to store if a series has been modified

This commit is contained in:
Ross
2023-12-18 10:21:47 +00:00
parent badd764844
commit e1c81e04b1
+14
View File
@@ -479,6 +479,11 @@ class SeriesImage(SeriesImageBase):
help_text="Reference to the object that has replaced this one.",
)
removed = models.BooleanField(
default=False,
help_text="Set to true if the file this object refers to has been removed (either from series truncation or merging)",
)
def get_dicom_data(self):
try:
with pydicom.dcmread(self.image) as d:
@@ -558,6 +563,15 @@ class Series(SeriesBase):
related_name="series",
)
class SeriesModifiedChocies(models.TextChoices):
NO = "NO", "Not modified",
TR = "TR", "Truncated",
RE = "RE", "Resliced/resampled",
modified = models.CharField(max_length=2, default=SeriesModifiedChocies.NO, choices=SeriesModifiedChocies.choices)
series_instance_uid = models.CharField(max_length=255, blank=True, null=True)
# findings = models.TextField(null=True, blank=True, help_text="Findings on the series / stack")