.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Generated by Django 3.2.4 on 2022-04-08 22:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0037_cidreportanswer_feedback'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='casecollection',
|
||||
old_name='show_description',
|
||||
new_name='show_description_pre',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='casecollection',
|
||||
old_name='show_discussion',
|
||||
new_name='show_discussion_pre',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='casecollection',
|
||||
old_name='show_history',
|
||||
new_name='show_history_pre',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='casecollection',
|
||||
old_name='show_report',
|
||||
new_name='show_report_pre',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='casecollection',
|
||||
old_name='show_title',
|
||||
new_name='show_title_pre',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='casecollection',
|
||||
name='publish_results',
|
||||
field=models.BooleanField(default=False, help_text='If a collection should published'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,63 @@
|
||||
# Generated by Django 3.2.4 on 2022-04-08 22:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0038_auto_20220408_2355'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='show_description_post',
|
||||
field=models.BooleanField(default=False, help_text='Show the description of the cases (post exam)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='show_discussion_post',
|
||||
field=models.BooleanField(default=False, help_text='Show the case discussion (post exam)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='show_history_post',
|
||||
field=models.BooleanField(default=False, help_text='Show the history of the cases (post exam)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='show_report_post',
|
||||
field=models.BooleanField(default=False, help_text='Show the case report (post exam)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='show_title_post',
|
||||
field=models.BooleanField(default=False, help_text='Show the title of the cases (post exam)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='casecollection',
|
||||
name='show_description_pre',
|
||||
field=models.BooleanField(default=False, help_text='Show the description of the cases (pre exam)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='casecollection',
|
||||
name='show_discussion_pre',
|
||||
field=models.BooleanField(default=False, help_text='Show the case discussion (pre exam)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='casecollection',
|
||||
name='show_history_pre',
|
||||
field=models.BooleanField(default=False, help_text='Show the history of the cases (pre exam)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='casecollection',
|
||||
name='show_report_pre',
|
||||
field=models.BooleanField(default=False, help_text='Show the case report (pre exam)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='casecollection',
|
||||
name='show_title_pre',
|
||||
field=models.BooleanField(default=False, help_text='Show the title of the cases (pre exam)'),
|
||||
),
|
||||
]
|
||||
+29
-12
@@ -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)
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
{% block content %}
|
||||
<h2>Case {{case_number|add:1}}
|
||||
|
||||
{% if collection.show_title %}
|
||||
{% if collection.show_title_pre %}
|
||||
: {{case.title}}
|
||||
{% endif %}
|
||||
|
||||
</h2>
|
||||
|
||||
{% if collection.show_description and case.description%}
|
||||
{% if collection.show_description_pre and case.description%}
|
||||
<div>
|
||||
Description: {{case.description}}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if collection.show_history and case.history%}
|
||||
{% if collection.show_history_pre and case.history%}
|
||||
<div>
|
||||
History: {{case.history}}
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% if collection.show_discussion and case.discussion%}
|
||||
{% if collection.show_discussion_pre and case.discussion%}
|
||||
<details>
|
||||
<summary>
|
||||
Discussion:
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% if collection.show_report and case.report%}
|
||||
{% if collection.show_report_pre and case.report%}
|
||||
<details>
|
||||
<summary>
|
||||
Report:
|
||||
|
||||
+2
-1
@@ -23,4 +23,5 @@ django-zipview
|
||||
pymemcache
|
||||
django-autocomplete-light
|
||||
django-querysetsequence
|
||||
dicognito
|
||||
dicognito
|
||||
django_unused_media
|
||||
Reference in New Issue
Block a user