From e1c81e04b16b0851a3146d91d6f7df333e888b63 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 18 Dec 2023 10:21:47 +0000 Subject: [PATCH] add field to store if a series has been modified --- atlas/models.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/atlas/models.py b/atlas/models.py index 47de88a8..0582f37f 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -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")