This commit is contained in:
Ross
2022-04-08 23:57:24 +01:00
parent 6efb72ddec
commit 1b6cb4f63a
5 changed files with 142 additions and 18 deletions
+29 -12
View File
@@ -11,7 +11,6 @@ import tagulous
import tagulous.models
import pydicom
import dicognito.anonymizer
@@ -591,7 +590,6 @@ class Series(models.Model):
pass
class CaseCollection(models.Model):
name = models.CharField(max_length=255, unique=True)
@@ -605,19 +603,37 @@ class CaseCollection(models.Model):
help_text="If a collection should be available", default=True
)
show_title = models.BooleanField(
default=False, help_text="Show the title of the cases"
show_title_pre = models.BooleanField(
default=False, help_text="Show the title of the cases (pre exam)"
)
show_history = models.BooleanField(
default=False, help_text="Show the history of the cases"
show_history_pre = models.BooleanField(
default=False, help_text="Show the history of the cases (pre exam)"
)
show_description = models.BooleanField(
default=False, help_text="Show the description of the cases"
show_description_pre = models.BooleanField(
default=False, help_text="Show the description of the cases (pre exam)"
)
show_discussion = models.BooleanField(
default=False, help_text="Show the case discussion"
show_discussion_pre = models.BooleanField(
default=False, help_text="Show the case discussion (pre exam)"
)
show_report_pre = models.BooleanField(
default=False, help_text="Show the case report (pre exam)"
)
show_title_post = models.BooleanField(
default=False, help_text="Show the title of the cases (post exam)"
)
show_history_post = models.BooleanField(
default=False, help_text="Show the history of the cases (post exam)"
)
show_description_post = models.BooleanField(
default=False, help_text="Show the description of the cases (post exam)"
)
show_discussion_post = models.BooleanField(
default=False, help_text="Show the case discussion (post exam)"
)
show_report_post = models.BooleanField(
default=False, help_text="Show the case report (post exam)"
)
show_report = models.BooleanField(default=False, help_text="Show the case report")
author = models.ManyToManyField(
settings.AUTH_USER_MODEL,
@@ -709,6 +725,7 @@ class CaseCollection(models.Model):
content_type=content_type, object_id=self.pk, cid_user=cid_user
)
class CaseDetail(models.Model):
case = models.ForeignKey(Case, on_delete=models.CASCADE)
collection = models.ForeignKey(CaseCollection, on_delete=models.CASCADE)
@@ -720,7 +737,7 @@ class CaseDetail(models.Model):
class CidReportAnswer(models.Model):
question = models.ForeignKey(CaseDetail, on_delete=models.CASCADE )
question = models.ForeignKey(CaseDetail, on_delete=models.CASCADE)
answer = models.TextField(blank=True)