From fd2f4523e3cff36e743309f9c1637fbb9cd9f4aa Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 26 Feb 2021 09:40:53 +0000 Subject: [PATCH] . --- longs/models.py | 15 ++++++++++++++- longs/templates/longs/long_series_viewer.html | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/longs/models.py b/longs/models.py index bb721490..ecb52d37 100644 --- a/longs/models.py +++ b/longs/models.py @@ -253,6 +253,19 @@ class LongSeries(models.Model): """Returns a comma seperated text list of regions""" return str(self.examination) + def get_examination_full(self): + examination = "" + plane = "" + contrast = "" + + if self.examination: + examination = self.examination + if self.plane: + plane = " {}".format(self.plane) + if self.contrast: + contrast = " {}".format(self.contrast) + return "{}{}{}".format(examination, plane, contrast) + def get_absolute_url(self): return reverse("longs:long_series_detail", kwargs={"pk": self.pk}) @@ -279,7 +292,7 @@ class LongSeries(models.Model): return format_html('', thumbnail), len(images) def get_block(self): - examination = self.get_examination() + examination = self.get_examination_full() thumb, image_number = self.get_thumbnail() return format_html( "
{}
{}
Images: {}
", examination, thumb, image_number diff --git a/longs/templates/longs/long_series_viewer.html b/longs/templates/longs/long_series_viewer.html index bfbec079..88e3196b 100755 --- a/longs/templates/longs/long_series_viewer.html +++ b/longs/templates/longs/long_series_viewer.html @@ -14,7 +14,7 @@ This series is not associated with any cases.
Author: {{ series.get_author_display }}
-Order dicoms +Order dicoms by slice location
Order by uploaded filename {% for image in series.images.all %} {{image.image.url}}, pos: {{image.position}}, {{image.upload_filename}}