.
This commit is contained in:
+112
-112
@@ -1,112 +1,112 @@
|
||||
from django.contrib import admin
|
||||
from .models import (
|
||||
Case,
|
||||
CaseDetail,
|
||||
CaseCollection,
|
||||
Differential,
|
||||
Series,
|
||||
SeriesImage,
|
||||
Condition,
|
||||
Subspecialty,
|
||||
Finding,
|
||||
SeriesFinding,
|
||||
Structure,
|
||||
PathologicalProcess,
|
||||
Presentation,
|
||||
)
|
||||
|
||||
import tagulous.admin
|
||||
|
||||
from django.forms import ModelForm
|
||||
|
||||
from reversion.admin import VersionAdmin
|
||||
from django.forms.widgets import RadioSelect
|
||||
|
||||
from tinymce.widgets import TinyMCE
|
||||
|
||||
# from generic.models import Examination, Sign, Site, Condition
|
||||
from generic.models import Examination
|
||||
|
||||
# Register your models here.
|
||||
# admin.site.register(Examination)
|
||||
# admin.site.register(Site)
|
||||
admin.site.register(SeriesImage)
|
||||
admin.site.register(Condition)
|
||||
admin.site.register(Subspecialty)
|
||||
admin.site.register(Finding)
|
||||
admin.site.register(Structure)
|
||||
admin.site.register(SeriesFinding)
|
||||
admin.site.register(Differential)
|
||||
admin.site.register(PathologicalProcess)
|
||||
admin.site.register(Presentation)
|
||||
admin.site.register(CaseDetail)
|
||||
|
||||
|
||||
class DifferentialInline(admin.TabularInline):
|
||||
model = Differential
|
||||
|
||||
class CasesInline(admin.TabularInline):
|
||||
model = CaseDetail
|
||||
|
||||
class CaseCollectionAdminForm(ModelForm):
|
||||
class Meta:
|
||||
model = CaseCollection
|
||||
|
||||
exclude = []
|
||||
|
||||
|
||||
class CaseCollectionAdmin(VersionAdmin):
|
||||
form = CaseCollectionAdminForm
|
||||
|
||||
save_on_top = True
|
||||
save_as = True
|
||||
view_on_site = True
|
||||
|
||||
inlines = (CasesInline,)
|
||||
|
||||
|
||||
admin.site.register(CaseCollection, CaseCollectionAdmin)
|
||||
|
||||
class AtlasAdminForm(ModelForm):
|
||||
class Meta:
|
||||
model = Case
|
||||
|
||||
fields = [
|
||||
"title",
|
||||
"description",
|
||||
"history",
|
||||
"discussion",
|
||||
"condition",
|
||||
"differential",
|
||||
"subspecialty",
|
||||
"author",
|
||||
"series",
|
||||
]
|
||||
|
||||
widgets = {
|
||||
# "normal": RadioSelect(
|
||||
# choices=[(True, 'Yes'),
|
||||
# (False, 'No')])
|
||||
"history": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
||||
"discussion": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
||||
}
|
||||
|
||||
|
||||
class AtlasAdmin(VersionAdmin):
|
||||
form = AtlasAdminForm
|
||||
|
||||
save_on_top = True
|
||||
save_as = True
|
||||
view_on_site = True
|
||||
|
||||
inlines = (DifferentialInline,)
|
||||
|
||||
|
||||
admin.site.register(Case, AtlasAdmin)
|
||||
|
||||
|
||||
class SeriesAdmin(VersionAdmin):
|
||||
pass
|
||||
|
||||
|
||||
admin.site.register(Series, SeriesAdmin)
|
||||
from django.contrib import admin
|
||||
from .models import (
|
||||
Case,
|
||||
CaseDetail,
|
||||
CaseCollection,
|
||||
Differential,
|
||||
Series,
|
||||
SeriesImage,
|
||||
Condition,
|
||||
Subspecialty,
|
||||
Finding,
|
||||
SeriesFinding,
|
||||
Structure,
|
||||
PathologicalProcess,
|
||||
Presentation,
|
||||
)
|
||||
|
||||
import tagulous.admin
|
||||
|
||||
from django.forms import ModelForm
|
||||
|
||||
from reversion.admin import VersionAdmin
|
||||
from django.forms.widgets import RadioSelect
|
||||
|
||||
from tinymce.widgets import TinyMCE
|
||||
|
||||
# from generic.models import Examination, Sign, Site, Condition
|
||||
from generic.models import Examination
|
||||
|
||||
# Register your models here.
|
||||
# admin.site.register(Examination)
|
||||
# admin.site.register(Site)
|
||||
admin.site.register(SeriesImage)
|
||||
admin.site.register(Condition)
|
||||
admin.site.register(Subspecialty)
|
||||
admin.site.register(Finding)
|
||||
admin.site.register(Structure)
|
||||
admin.site.register(SeriesFinding)
|
||||
admin.site.register(Differential)
|
||||
admin.site.register(PathologicalProcess)
|
||||
admin.site.register(Presentation)
|
||||
admin.site.register(CaseDetail)
|
||||
|
||||
|
||||
class DifferentialInline(admin.TabularInline):
|
||||
model = Differential
|
||||
|
||||
class CasesInline(admin.TabularInline):
|
||||
model = CaseDetail
|
||||
|
||||
class CaseCollectionAdminForm(ModelForm):
|
||||
class Meta:
|
||||
model = CaseCollection
|
||||
|
||||
exclude = []
|
||||
|
||||
|
||||
class CaseCollectionAdmin(VersionAdmin):
|
||||
form = CaseCollectionAdminForm
|
||||
|
||||
save_on_top = True
|
||||
save_as = True
|
||||
view_on_site = True
|
||||
|
||||
inlines = (CasesInline,)
|
||||
|
||||
|
||||
admin.site.register(CaseCollection, CaseCollectionAdmin)
|
||||
|
||||
class AtlasAdminForm(ModelForm):
|
||||
class Meta:
|
||||
model = Case
|
||||
|
||||
fields = [
|
||||
"title",
|
||||
"description",
|
||||
"history",
|
||||
"discussion",
|
||||
"condition",
|
||||
"differential",
|
||||
"subspecialty",
|
||||
"author",
|
||||
"series",
|
||||
]
|
||||
|
||||
widgets = {
|
||||
# "normal": RadioSelect(
|
||||
# choices=[(True, 'Yes'),
|
||||
# (False, 'No')])
|
||||
"history": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
||||
"discussion": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
||||
}
|
||||
|
||||
|
||||
class AtlasAdmin(VersionAdmin):
|
||||
form = AtlasAdminForm
|
||||
|
||||
save_on_top = True
|
||||
save_as = True
|
||||
view_on_site = True
|
||||
|
||||
inlines = (DifferentialInline,)
|
||||
|
||||
|
||||
admin.site.register(Case, AtlasAdmin)
|
||||
|
||||
|
||||
class SeriesAdmin(VersionAdmin):
|
||||
pass
|
||||
|
||||
|
||||
admin.site.register(Series, SeriesAdmin)
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
# Generated by Django 3.2.10 on 2022-03-21 16:02
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0024_alter_case_previous_case'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CaseCollection',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, unique=True)),
|
||||
('open_access', models.BooleanField(default=True, help_text='If a collection should be freely available to browse')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CaseDetail',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('sort_order', models.IntegerField()),
|
||||
('case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atlas.case')),
|
||||
('collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atlas.casecollection')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='cases',
|
||||
field=models.ManyToManyField(through='atlas.CaseDetail', to='atlas.Case'),
|
||||
),
|
||||
]
|
||||
# Generated by Django 3.2.10 on 2022-03-21 16:02
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0024_alter_case_previous_case'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CaseCollection',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, unique=True)),
|
||||
('open_access', models.BooleanField(default=True, help_text='If a collection should be freely available to browse')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CaseDetail',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('sort_order', models.IntegerField()),
|
||||
('case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atlas.case')),
|
||||
('collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atlas.casecollection')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='cases',
|
||||
field=models.ManyToManyField(through='atlas.CaseDetail', to='atlas.Case'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
# Generated by Django 3.2.10 on 2022-03-21 16:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0025_auto_20220321_1602'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='case',
|
||||
name='open_access',
|
||||
field=models.BooleanField(default=True, help_text='If a case should be freely available to browse'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='series',
|
||||
name='open_access',
|
||||
field=models.BooleanField(default=True, help_text='If a series should be freely available to browse'),
|
||||
),
|
||||
]
|
||||
# Generated by Django 3.2.10 on 2022-03-21 16:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0025_auto_20220321_1602'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='case',
|
||||
name='open_access',
|
||||
field=models.BooleanField(default=True, help_text='If a case should be freely available to browse'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='series',
|
||||
name='open_access',
|
||||
field=models.BooleanField(default=True, help_text='If a series should be freely available to browse'),
|
||||
),
|
||||
]
|
||||
|
||||
+575
-568
File diff suppressed because it is too large
Load Diff
@@ -1,125 +1,125 @@
|
||||
<div class="atlas {% if case.scrapped %}atlas-scrapped{% endif %}">
|
||||
<div class="date">
|
||||
{{ case.created_date|date:"d/m/Y" }}
|
||||
</div>
|
||||
<div class="id">
|
||||
ID: {{ case.id }}
|
||||
</div>
|
||||
<p class="pre-whitespace"><b>Title:</b> {{ case.title }}</p>
|
||||
|
||||
<p class="pre-whitespace"><b>Description:</b> {{ case.description }}</p>
|
||||
|
||||
<p>
|
||||
<b>Presentation:</b>
|
||||
<ul>
|
||||
{% for presentation in case.presentation.all %}
|
||||
<li>{{presentation.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p class="pre-whitespace"><b>History:</b> {{ case.history }}</p>
|
||||
|
||||
<p class="pre-whitespace"><b>Discussion:</b> {{ case.discussion }}</p>
|
||||
|
||||
<p class="pre-whitespace"><b>Report:</b> {{ case.report }}</p>
|
||||
|
||||
<div class="pre-whitespace multi-image-block"><b>Series:</b>
|
||||
{% for series in case.series.all %}
|
||||
<span class="series-block">
|
||||
<span>
|
||||
Series {{ forloop.counter }}:
|
||||
<a href="{% url 'atlas:series_detail' pk=series.pk %}">
|
||||
{{series.get_block}}
|
||||
</a>
|
||||
|
||||
<a href="#"
|
||||
onclick="return window.create_popup_window('/atlas/series/{{series.pk}}', 'Series')">Popup</a>
|
||||
</span>
|
||||
</span>
|
||||
{% endfor %}
|
||||
<a href="{% url 'atlas:series_id_create' pk=case.pk %}">Add new series</a><br />
|
||||
</div>
|
||||
{% comment %} <p><b>Scrapped:</b> {{ case.scrapped }} <a
|
||||
href="{% url 'atlas:case_scrap' pk=case.pk %}">(toggle)</a> {% endcomment %}
|
||||
|
||||
<div class="atlas-answer">
|
||||
<p class="pre-whitespace">
|
||||
Condition:
|
||||
<ul>
|
||||
{% for con in case.condition.all %}
|
||||
<li>{{con.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<details>
|
||||
<summary><b>Findings</b></summary>
|
||||
{% if case.series.all %}
|
||||
See individual series for more details.<br/>
|
||||
{% for series in case.series.all %}
|
||||
{% for finding in series.findings.all %}
|
||||
<div class="finding-box">
|
||||
<span>
|
||||
<a href="{{series.get_absolute_url}}">Series {{series.pk}}</a>: {{series.get_examination_full}} |
|
||||
</span>
|
||||
{% if finding.findings.all %}
|
||||
<span>
|
||||
Findings: {% for f in finding.findings.all %}
|
||||
{{f.get_link}},
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if finding.structures.all %}
|
||||
<span>
|
||||
Structure: {% for s in finding.structures.all %}
|
||||
{{s.get_link}},
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if finding.description %}
|
||||
<span>
|
||||
Description: {{finding.description}}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
No findings associated with case.
|
||||
{% endif %}
|
||||
</details>
|
||||
<details open>
|
||||
<summary><b>Differentials</b></summary>
|
||||
<ul>
|
||||
{% for diff in case.differentialcase.all %}
|
||||
<li>{{diff.condition.get_link}} - {{diff.text}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</p>
|
||||
</div>
|
||||
Subspecialty:
|
||||
<ul>
|
||||
{% for sub in case.subspecialty.all %}
|
||||
<li>{{sub.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<b>Pathological Process:</b>
|
||||
<ul>
|
||||
{% for p in case.pathological_process.all %}
|
||||
<li>{{p.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
<p class="pre-whitespace"><b>Previous case:</b> {{ case.previous_case }}</p>
|
||||
<p class="pre-whitespace"><b>Next case:</b> {{ case.next_case }}</p>
|
||||
<div>
|
||||
{% include 'question_notes.html' %}
|
||||
|
||||
</div>
|
||||
|
||||
<p><b>Checked by:</b> {% for verified in case.verified.all %} <a
|
||||
href="{% url 'atlas:verified_detail' pk=verified.pk %}">{{verified}}</a>, {% endfor %}</p>
|
||||
|
||||
<p><b>Author(s):</b> {% for author in case.author.all %} <a
|
||||
href="{% url 'atlas:author_detail' pk=author.pk %}">{{author}}</a>, {% endfor %}</p>
|
||||
<div class="atlas {% if case.scrapped %}atlas-scrapped{% endif %}">
|
||||
<div class="date">
|
||||
{{ case.created_date|date:"d/m/Y" }}
|
||||
</div>
|
||||
<div class="id">
|
||||
ID: {{ case.id }}
|
||||
</div>
|
||||
<p class="pre-whitespace"><b>Title:</b> {{ case.title }}</p>
|
||||
|
||||
<p class="pre-whitespace"><b>Description:</b> {{ case.description }}</p>
|
||||
|
||||
<p>
|
||||
<b>Presentation:</b>
|
||||
<ul>
|
||||
{% for presentation in case.presentation.all %}
|
||||
<li>{{presentation.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p class="pre-whitespace"><b>History:</b> {{ case.history }}</p>
|
||||
|
||||
<p class="pre-whitespace"><b>Discussion:</b> {{ case.discussion }}</p>
|
||||
|
||||
<p class="pre-whitespace"><b>Report:</b> {{ case.report }}</p>
|
||||
|
||||
<div class="pre-whitespace multi-image-block"><b>Series:</b>
|
||||
{% for series in case.series.all %}
|
||||
<span class="series-block">
|
||||
<span>
|
||||
Series {{ forloop.counter }}:
|
||||
<a href="{% url 'atlas:series_detail' pk=series.pk %}">
|
||||
{{series.get_block}}
|
||||
</a>
|
||||
|
||||
<a href="#"
|
||||
onclick="return window.create_popup_window('/atlas/series/{{series.pk}}', 'Series')">Popup</a>
|
||||
</span>
|
||||
</span>
|
||||
{% endfor %}
|
||||
<a href="{% url 'atlas:series_id_create' pk=case.pk %}">Add new series</a><br />
|
||||
</div>
|
||||
{% comment %} <p><b>Scrapped:</b> {{ case.scrapped }} <a
|
||||
href="{% url 'atlas:case_scrap' pk=case.pk %}">(toggle)</a> {% endcomment %}
|
||||
|
||||
<div class="atlas-answer">
|
||||
<p class="pre-whitespace">
|
||||
Condition:
|
||||
<ul>
|
||||
{% for con in case.condition.all %}
|
||||
<li>{{con.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<details>
|
||||
<summary><b>Findings</b></summary>
|
||||
{% if case.series.all %}
|
||||
See individual series for more details.<br/>
|
||||
{% for series in case.series.all %}
|
||||
{% for finding in series.findings.all %}
|
||||
<div class="finding-box">
|
||||
<span>
|
||||
<a href="{{series.get_absolute_url}}">Series {{series.pk}}</a>: {{series.get_examination_full}} |
|
||||
</span>
|
||||
{% if finding.findings.all %}
|
||||
<span>
|
||||
Findings: {% for f in finding.findings.all %}
|
||||
{{f.get_link}},
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if finding.structures.all %}
|
||||
<span>
|
||||
Structure: {% for s in finding.structures.all %}
|
||||
{{s.get_link}},
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if finding.description %}
|
||||
<span>
|
||||
Description: {{finding.description}}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
No findings associated with case.
|
||||
{% endif %}
|
||||
</details>
|
||||
<details open>
|
||||
<summary><b>Differentials</b></summary>
|
||||
<ul>
|
||||
{% for diff in case.differentialcase.all %}
|
||||
<li>{{diff.condition.get_link}} - {{diff.text}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</p>
|
||||
</div>
|
||||
Subspecialty:
|
||||
<ul>
|
||||
{% for sub in case.subspecialty.all %}
|
||||
<li>{{sub.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<b>Pathological Process:</b>
|
||||
<ul>
|
||||
{% for p in case.pathological_process.all %}
|
||||
<li>{{p.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
<p class="pre-whitespace"><b>Previous case:</b> {{ case.previous_case }}</p>
|
||||
<p class="pre-whitespace"><b>Next case:</b> {{ case.next_case }}</p>
|
||||
<div>
|
||||
{% include 'question_notes.html' %}
|
||||
|
||||
</div>
|
||||
|
||||
<p><b>Checked by:</b> {% for verified in case.verified.all %} <a
|
||||
href="{% url 'atlas:verified_detail' pk=verified.pk %}">{{verified}}</a>, {% endfor %}</p>
|
||||
|
||||
<p><b>Author(s):</b> {% for author in case.author.all %} <a
|
||||
href="{% url 'atlas:author_detail' pk=author.pk %}">{{author}}</a>, {% endfor %}</p>
|
||||
|
||||
@@ -1,40 +1,52 @@
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Case {{case_number|add:1}}</h2>
|
||||
|
||||
<div class="pre-whitespace multi-image-block">
|
||||
{% for series in series_list %}
|
||||
<span class="series-block">
|
||||
<span>
|
||||
Series {{ forloop.counter }}:
|
||||
<a href="{% url 'atlas:series_detail' pk=series.pk %}">
|
||||
{{series.get_block}}
|
||||
</a>
|
||||
|
||||
<a href="#"
|
||||
onclick="return window.create_popup_window('/atlas/series/{{series.pk}}', 'Series')">Popup</a>
|
||||
</span>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% for series in series_list %}
|
||||
<div>
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
<div>
|
||||
{% if previous %}
|
||||
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:-1 %}">Previous</a>
|
||||
{% endif %}
|
||||
{% if next %}
|
||||
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:1 %}">Next</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br/>
|
||||
Return to <a href='{{collection.get_absolute_url}}'>collection</a>
|
||||
{% endblock %}
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Case {{case_number|add:1}}</h2>
|
||||
|
||||
<div class="pre-whitespace multi-image-block">
|
||||
{% for series in series_list %}
|
||||
<span class="series-block">
|
||||
<span>
|
||||
Series {{ forloop.counter }}:
|
||||
<a href="{% url 'atlas:series_detail' pk=series.pk %}">
|
||||
{{series.get_block}}
|
||||
</a>
|
||||
|
||||
<a href="#"
|
||||
onclick="return window.create_popup_window('/atlas/series/{{series.pk}}', 'Series')">Popup</a>
|
||||
</span>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% if previous %}
|
||||
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:-1 %}">Previous</a>
|
||||
{% endif %}
|
||||
{% if next %}
|
||||
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:1 %}">Next</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br/>
|
||||
Return to <a href='{{collection.get_absolute_url}}'>collection</a>
|
||||
{% endblock %}
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.images = {
|
||||
{% for series in series_list %}
|
||||
{{forloop.counter0}} : ["{{ series.get_image_url_array_not_json }}"],
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
loadDicomViewer(window.images[0])
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock js %}
|
||||
@@ -1,12 +1,12 @@
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{collection.name}}
|
||||
<ul>
|
||||
{% for case in collection.cases.all %}
|
||||
<li><a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=forloop.counter0 %}">Case {{forloop.counter}}</a></li>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{collection.name}}
|
||||
<ul>
|
||||
{% for case in collection.cases.all %}
|
||||
<li><a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=forloop.counter0 %}">Case {{forloop.counter}}</a></li>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,9 +1,9 @@
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for collection in collections %}
|
||||
<li><a href='{{collection.get_absolute_url}}'>{{collection.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for collection in collections %}
|
||||
<li><a href='{{collection.get_absolute_url}}'>{{collection.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,172 +1,172 @@
|
||||
<div>{{ series.modality}}, {{ series.examination }}, {{ series.plane }}, {{ series.contrast }}</div>
|
||||
|
||||
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''>
|
||||
</div>
|
||||
|
||||
{% if editing_finding < 1 %}
|
||||
<button id="add-finding-button">Add finding</button>
|
||||
{% endif %}
|
||||
<button id="reset-viewport-button">Reset viewport</button>
|
||||
<div id="finding-form">
|
||||
<div class="hide" id="hidden-form">
|
||||
<form method="post" id="series_finding_form">
|
||||
{% csrf_token %}
|
||||
{{series_finding_form.management_form}}
|
||||
<div>
|
||||
<div>Description: {{ series_finding_form.description }}</div>
|
||||
<div>Findings: {{ series_finding_form.findings }}</div>
|
||||
<div>Structures: {{ series_finding_form.structures }}</div>
|
||||
</div>
|
||||
<input type="submit" value="Submit">
|
||||
<button id="cancel-add-finding-button">Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<details open>
|
||||
<summary>Findings</summary>
|
||||
|
||||
{% for finding in series.findings.all %}
|
||||
<div class="finding-box">
|
||||
<button class="view-finding-button" data-annotationjson={{finding.annotation_json}}
|
||||
data-viewportjson={{finding.viewport_json}} data-findingid={{finding.id}}>Click to view</button>
|
||||
<span class="view-finding-details">
|
||||
Finding(s): {% for f in finding.findings.all %}{{f.get_link}}{% endfor %}<br />
|
||||
Structure(s): {% for s in finding.structures.all %}{{s.get_link}}{% endfor %}<br />
|
||||
Description: {{finding.description}}<br />
|
||||
</span>
|
||||
<a href="{% url 'atlas:series_edit_finding' pk=series.pk finding_pk=finding.pk %}" class="edit-finding-link">Edit</a>
|
||||
<a href="{% url 'atlas:delete_finding' pk=finding.pk %}" class="delete-finding-link">Delete</a>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</details>
|
||||
|
||||
|
||||
<div>Author: {{ series.get_author_display }}</div>
|
||||
<details>
|
||||
<summary>Image info</summary>
|
||||
<div>
|
||||
<a href="{% url 'atlas:series_order_dicom' pk=series.pk %}" title="orders dicom by slice location">Order dicoms
|
||||
by slice location</a>
|
||||
<a href="{% url 'atlas:series_order_dicom_instance' pk=series.pk %}"
|
||||
title="orders dicom by instance number">Order dicoms by instance number</a>
|
||||
<a href="{% url 'atlas:series_order_dicom_SeriesInstanceUID' pk=series.pk %}"
|
||||
title="orders dicom by instance number">Order dicoms by SeriesInstanceUID</a>
|
||||
<a href="{% url 'atlas:series_order_upload_filename' pk=series.pk %}"
|
||||
title="orders dicom by uploaded filename">Order by uploaded filename</a>
|
||||
</div>
|
||||
{% for image in series.images.all %}
|
||||
{{image.image.url}}, pos: {{image.position}}, {{image.upload_filename}} [{{image.image.size|filesizeformat}}]<br />
|
||||
{% comment %} {{image.get_dicom_info|safe}}<br /> {% endcomment %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
<p>Total image size: {{series.get_total_image_size|filesizeformat}}</p>
|
||||
<p><a href="{% url 'atlas:series_download' pk=series.pk %}">Download images</a></p>
|
||||
</details>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#add-finding-button").click(() => {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.clear(dicom_element);
|
||||
cornerstone.reset(dicom_element);
|
||||
cornerstone.resize(dicom_element, true);
|
||||
//$("#finding-form").empty().append(
|
||||
// $("#hidden-form form").clone()
|
||||
//);
|
||||
$("#hidden-form").show()
|
||||
|
||||
});
|
||||
$("#cancel-add-finding-button").click((e) => {
|
||||
$("#hidden-form").hide()
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
$("#reset-viewport-button").click(() => {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
//annotationjson = JSON.parse(e.currentTarget.dataset.annotationjson);
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.clear(dicom_element);
|
||||
cornerstone.reset(dicom_element);
|
||||
cornerstone.resize(dicom_element, true);
|
||||
|
||||
});
|
||||
|
||||
$(".view-finding-button").each((n, el) => {
|
||||
$(el).click((e) => {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
annotationjson = JSON.parse(e.currentTarget.dataset.annotationjson);
|
||||
viewport = JSON.parse(e.currentTarget.dataset.viewportjson);
|
||||
loadAnnotationAndViewportOnElement(annotationjson, viewport, dicom_element);
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
{% if editing_finding > 0 %}
|
||||
$("#hidden-form").show()
|
||||
setTimeout(function() {
|
||||
$(".view-finding-button[data-findingid={{editing_finding}}]").trigger("click");
|
||||
}, 1000)
|
||||
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function loadAnnotationAndViewportOnElement(annotation, viewport, dicom_element) {
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.clear(dicom_element);
|
||||
cornerstone.getEnabledElement(dicom_element).viewport = viewport
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(
|
||||
annotation);
|
||||
console.log(annotation)
|
||||
//cornerstone.getEnabledElement(dicom_element).toolStateManager.restoreToolState(annotationjson)
|
||||
cornerstone.resize(dicom_element);
|
||||
|
||||
dicomViewer.getNextAnnotationImage(dicom_element);
|
||||
|
||||
}
|
||||
|
||||
$(document).on('submit', '#series_finding_form', function (e) {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
c = cornerstone.getEnabledElement(dicom_element);
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '{% url "atlas:add_finding" %}',
|
||||
data: {
|
||||
series_finding_id: {{ editing_finding }},
|
||||
description: $('#id_description').val(),
|
||||
series: {{ series.pk }},
|
||||
//annotation_json: JSON.stringify(c.toolStateManager.saveToolState()),
|
||||
annotation_json: JSON.stringify(cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
.saveToolState()),
|
||||
viewport_json: JSON.stringify(c.viewport),
|
||||
findings: JSON.stringify($('#finding-form select[name="findings"]').find(":selected")
|
||||
.map((i, el) => {
|
||||
return $(el).val()
|
||||
}).toArray()),
|
||||
structures: JSON.stringify($('#finding-form select[name="structures"]').find(
|
||||
":selected")
|
||||
.map((i, el) => {
|
||||
return $(el).val()
|
||||
}).toArray()),
|
||||
csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val(),
|
||||
action: 'post'
|
||||
},
|
||||
success: function (json) {
|
||||
$("#finding-form").empty();
|
||||
toastr.info('Finding added.');
|
||||
location.href='{{series.get_absolute_url}}';
|
||||
},
|
||||
error: function (xhr, errmsg, err) {
|
||||
console.log(xhr.status + ": " + xhr
|
||||
.responseText); // provide a bit more info about the error to the console
|
||||
}
|
||||
});
|
||||
});
|
||||
<div>{{ series.modality}}, {{ series.examination }}, {{ series.plane }}, {{ series.contrast }}</div>
|
||||
|
||||
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''>
|
||||
</div>
|
||||
|
||||
{% if editing_finding < 1 %}
|
||||
<button id="add-finding-button">Add finding</button>
|
||||
{% endif %}
|
||||
<button id="reset-viewport-button">Reset viewport</button>
|
||||
<div id="finding-form">
|
||||
<div class="hide" id="hidden-form">
|
||||
<form method="post" id="series_finding_form">
|
||||
{% csrf_token %}
|
||||
{{series_finding_form.management_form}}
|
||||
<div>
|
||||
<div>Description: {{ series_finding_form.description }}</div>
|
||||
<div>Findings: {{ series_finding_form.findings }}</div>
|
||||
<div>Structures: {{ series_finding_form.structures }}</div>
|
||||
</div>
|
||||
<input type="submit" value="Submit">
|
||||
<button id="cancel-add-finding-button">Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<details open>
|
||||
<summary>Findings</summary>
|
||||
|
||||
{% for finding in series.findings.all %}
|
||||
<div class="finding-box">
|
||||
<button class="view-finding-button" data-annotationjson={{finding.annotation_json}}
|
||||
data-viewportjson={{finding.viewport_json}} data-findingid={{finding.id}}>Click to view</button>
|
||||
<span class="view-finding-details">
|
||||
Finding(s): {% for f in finding.findings.all %}{{f.get_link}}{% endfor %}<br />
|
||||
Structure(s): {% for s in finding.structures.all %}{{s.get_link}}{% endfor %}<br />
|
||||
Description: {{finding.description}}<br />
|
||||
</span>
|
||||
<a href="{% url 'atlas:series_edit_finding' pk=series.pk finding_pk=finding.pk %}" class="edit-finding-link">Edit</a>
|
||||
<a href="{% url 'atlas:delete_finding' pk=finding.pk %}" class="delete-finding-link">Delete</a>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</details>
|
||||
|
||||
|
||||
<div>Author: {{ series.get_author_display }}</div>
|
||||
<details>
|
||||
<summary>Image info</summary>
|
||||
<div>
|
||||
<a href="{% url 'atlas:series_order_dicom' pk=series.pk %}" title="orders dicom by slice location">Order dicoms
|
||||
by slice location</a>
|
||||
<a href="{% url 'atlas:series_order_dicom_instance' pk=series.pk %}"
|
||||
title="orders dicom by instance number">Order dicoms by instance number</a>
|
||||
<a href="{% url 'atlas:series_order_dicom_SeriesInstanceUID' pk=series.pk %}"
|
||||
title="orders dicom by instance number">Order dicoms by SeriesInstanceUID</a>
|
||||
<a href="{% url 'atlas:series_order_upload_filename' pk=series.pk %}"
|
||||
title="orders dicom by uploaded filename">Order by uploaded filename</a>
|
||||
</div>
|
||||
{% for image in series.images.all %}
|
||||
{{image.image.url}}, pos: {{image.position}}, {{image.upload_filename}} [{{image.image.size|filesizeformat}}]<br />
|
||||
{% comment %} {{image.get_dicom_info|safe}}<br /> {% endcomment %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
<p>Total image size: {{series.get_total_image_size|filesizeformat}}</p>
|
||||
<p><a href="{% url 'atlas:series_download' pk=series.pk %}">Download images</a></p>
|
||||
</details>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#add-finding-button").click(() => {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.clear(dicom_element);
|
||||
cornerstone.reset(dicom_element);
|
||||
cornerstone.resize(dicom_element, true);
|
||||
//$("#finding-form").empty().append(
|
||||
// $("#hidden-form form").clone()
|
||||
//);
|
||||
$("#hidden-form").show()
|
||||
|
||||
});
|
||||
$("#cancel-add-finding-button").click((e) => {
|
||||
$("#hidden-form").hide()
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
$("#reset-viewport-button").click(() => {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
//annotationjson = JSON.parse(e.currentTarget.dataset.annotationjson);
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.clear(dicom_element);
|
||||
cornerstone.reset(dicom_element);
|
||||
cornerstone.resize(dicom_element, true);
|
||||
|
||||
});
|
||||
|
||||
$(".view-finding-button").each((n, el) => {
|
||||
$(el).click((e) => {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
annotationjson = JSON.parse(e.currentTarget.dataset.annotationjson);
|
||||
viewport = JSON.parse(e.currentTarget.dataset.viewportjson);
|
||||
loadAnnotationAndViewportOnElement(annotationjson, viewport, dicom_element);
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
{% if editing_finding > 0 %}
|
||||
$("#hidden-form").show()
|
||||
setTimeout(function() {
|
||||
$(".view-finding-button[data-findingid={{editing_finding}}]").trigger("click");
|
||||
}, 1000)
|
||||
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function loadAnnotationAndViewportOnElement(annotation, viewport, dicom_element) {
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.clear(dicom_element);
|
||||
cornerstone.getEnabledElement(dicom_element).viewport = viewport
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(
|
||||
annotation);
|
||||
console.log(annotation)
|
||||
//cornerstone.getEnabledElement(dicom_element).toolStateManager.restoreToolState(annotationjson)
|
||||
cornerstone.resize(dicom_element);
|
||||
|
||||
dicomViewer.getNextAnnotationImage(dicom_element);
|
||||
|
||||
}
|
||||
|
||||
$(document).on('submit', '#series_finding_form', function (e) {
|
||||
dicom_element = $(".cornerstone-element").get(0);
|
||||
c = cornerstone.getEnabledElement(dicom_element);
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '{% url "atlas:add_finding" %}',
|
||||
data: {
|
||||
series_finding_id: {{ editing_finding }},
|
||||
description: $('#id_description').val(),
|
||||
series: {{ series.pk }},
|
||||
//annotation_json: JSON.stringify(c.toolStateManager.saveToolState()),
|
||||
annotation_json: JSON.stringify(cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
.saveToolState()),
|
||||
viewport_json: JSON.stringify(c.viewport),
|
||||
findings: JSON.stringify($('#finding-form select[name="findings"]').find(":selected")
|
||||
.map((i, el) => {
|
||||
return $(el).val()
|
||||
}).toArray()),
|
||||
structures: JSON.stringify($('#finding-form select[name="structures"]').find(
|
||||
":selected")
|
||||
.map((i, el) => {
|
||||
return $(el).val()
|
||||
}).toArray()),
|
||||
csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val(),
|
||||
action: 'post'
|
||||
},
|
||||
success: function (json) {
|
||||
$("#finding-form").empty();
|
||||
toastr.info('Finding added.');
|
||||
location.href='{{series.get_absolute_url}}';
|
||||
},
|
||||
error: function (xhr, errmsg, err) {
|
||||
console.log(xhr.status + ": " + xhr
|
||||
.responseText); // provide a bit more info about the error to the console
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
+151
-151
@@ -1,151 +1,151 @@
|
||||
from django.urls import path, include
|
||||
|
||||
from atlas.models import Condition, Finding, Presentation, Structure
|
||||
from . import views
|
||||
|
||||
app_name = "atlas"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.CaseView.as_view(), name="index"),
|
||||
path("author/<int:pk>/", views.author_detail, name="author_detail"),
|
||||
path("author/", views.author_list, name="author_list"),
|
||||
path("case/", views.CaseView.as_view(), name="case_view"),
|
||||
path("collection/", views.collection_index_view, name="collection_index_view"),
|
||||
path("collections/<int:pk>", views.collection_detail_view, name="collection_detail_view"),
|
||||
path("collections/<int:pk>/<int:case_number>", views.collection_case_view, name="collection_case_view"),
|
||||
path("condition/", views.ConditionView.as_view(), name="condition_view"),
|
||||
path("categories/", views.categories_list, name="categories_list"),
|
||||
path("condition/<int:pk>", views.condition_detail, name="condition_detail"),
|
||||
path(
|
||||
"condition/<int:pk>/delete",
|
||||
views.ConditionDelete.as_view(),
|
||||
name="condition_delete",
|
||||
),
|
||||
path(
|
||||
"condition/<int:pk>/update",
|
||||
views.ConditionUpdate.as_view(),
|
||||
name="condition_update",
|
||||
),
|
||||
path("subspecialty/", views.SubspecialtyView.as_view(), name="subspecialty_view"),
|
||||
path("subspecialty/<int:pk>", views.subspecialty_detail, name="subspecialty_detail"),
|
||||
path("condition/create", views.ConditionCreate.as_view(), name="condition_create"),
|
||||
path("finding/", views.FindingView.as_view(), name="finding_view"),
|
||||
path("finding/<int:pk>", views.finding_detail, name="finding_detail"),
|
||||
path(
|
||||
"finding/<int:pk>/delete", views.FindingDelete.as_view(), name="finding_delete"
|
||||
),
|
||||
path(
|
||||
"finding/<int:pk>/update", views.FindingUpdate.as_view(), name="finding_update"
|
||||
),
|
||||
path("finding/create", views.FindingCreate.as_view(), name="finding_create"),
|
||||
path("structure/", views.StructureView.as_view(), name="structure_view"),
|
||||
path("structure/<int:pk>", views.structure_detail, name="structure_detail"),
|
||||
path(
|
||||
"structure/<int:pk>/delete",
|
||||
views.StructureDelete.as_view(),
|
||||
name="structure_delete",
|
||||
),
|
||||
path(
|
||||
"structure/<int:pk>/update",
|
||||
views.StructureUpdate.as_view(),
|
||||
name="structure_update",
|
||||
),
|
||||
path("structure/create", views.StructureCreate.as_view(), name="structure_create"),
|
||||
path("series/<int:pk>", views.series_detail, name="series_detail"),
|
||||
path("series/", views.SeriesView.as_view(), name="series_view"),
|
||||
path("series/<int:pk>", views.series_detail, name="series_detail"),
|
||||
path(
|
||||
"series/<int:pk>/<int:finding_pk>",
|
||||
views.series_detail,
|
||||
name="series_edit_finding",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_dicom",
|
||||
views.series_order_dicom,
|
||||
name="series_order_dicom",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/download",
|
||||
views.SeriesImagesZipView.as_view(),
|
||||
name="series_download",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_dicom_instance",
|
||||
views.series_order_dicom_instance,
|
||||
name="series_order_dicom_instance",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_dicom_SeriesInstanceUID",
|
||||
views.series_order_dicom_SeriesInstanceUID,
|
||||
name="series_order_dicom_SeriesInstanceUID",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_upload_filename",
|
||||
views.series_order_upload_filename,
|
||||
name="series_order_upload_filename",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/delete",
|
||||
views.SeriesDelete.as_view(),
|
||||
name="series_delete",
|
||||
),
|
||||
# path("unchecked/", views.unchecked_list, name="unchecked_list"),
|
||||
# path("verified/<int:pk>/", views.verified_detail, name="verified_detail"),
|
||||
path("case/<int:pk>/", views.case_detail, name="case_detail"),
|
||||
path("case/<int:pk>/clone", views.AtlasClone.as_view(), name="case_clone"),
|
||||
# path("verified/", views.verified, name="verified"),
|
||||
# path("all_questions/", views.all_questions, name="all_questions"),
|
||||
path("case/<int:pk>/scrap", views.atlas_scrap, name="case_scrap"),
|
||||
path("case/<int:pk>/delete", views.CaseDelete.as_view(), name="case_delete"),
|
||||
path("case/create/", views.AtlasCreate.as_view(), name="create"),
|
||||
path("series/create", views.SeriesCreate.as_view(), name="series_create"),
|
||||
path(
|
||||
"series/<int:pk>/create",
|
||||
views.SeriesCreate.as_view(),
|
||||
name="series_id_create",
|
||||
),
|
||||
path(
|
||||
"case/<int:pk>/update",
|
||||
views.AtlasUpdate.as_view(),
|
||||
name="case_update",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/update",
|
||||
views.SeriesUpdate.as_view(),
|
||||
name="series_update",
|
||||
),
|
||||
path(
|
||||
"series/add_finding",
|
||||
views.create_series_findings,
|
||||
name="add_finding",
|
||||
),
|
||||
path(
|
||||
"series/delete_finding/<int:pk>",
|
||||
views.SeriesFindingDelete.as_view(),
|
||||
name="delete_finding",
|
||||
),
|
||||
path(
|
||||
"condition-autocomplete",
|
||||
views.ConditionAutocomplete.as_view(model=Condition, create_field="name"),
|
||||
name="condition-autocomplete",
|
||||
),
|
||||
path(
|
||||
"presentation-autocomplete",
|
||||
views.PresentationAutocomplete.as_view(model=Presentation, create_field="name"),
|
||||
name="presentation-autocomplete",
|
||||
),
|
||||
path(
|
||||
"finding-autocomplete",
|
||||
views.FindingAutocomplete.as_view(model=Finding, create_field="name"),
|
||||
name="finding-autocomplete",
|
||||
),
|
||||
path(
|
||||
"structure-autocomplete",
|
||||
views.StructureAutocomplete.as_view(model=Structure, create_field="name"),
|
||||
name="structure-autocomplete",
|
||||
),
|
||||
path("presentation/", views.PresentationView.as_view(), name="presentation_view"),
|
||||
path("presentation/<int:pk>", views.presentation_detail, name="presentation_detail"),
|
||||
path("process/", views.PathologicalProcessView.as_view(), name="pathological_process_view"),
|
||||
path("process/<int:pk>", views.pathological_process_detail, name="pathological_process_detail"),
|
||||
]
|
||||
from django.urls import path, include
|
||||
|
||||
from atlas.models import Condition, Finding, Presentation, Structure
|
||||
from . import views
|
||||
|
||||
app_name = "atlas"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.CaseView.as_view(), name="index"),
|
||||
path("author/<int:pk>/", views.author_detail, name="author_detail"),
|
||||
path("author/", views.author_list, name="author_list"),
|
||||
path("case/", views.CaseView.as_view(), name="case_view"),
|
||||
path("collection/", views.collection_index_view, name="collection_index_view"),
|
||||
path("collections/<int:pk>", views.collection_detail_view, name="collection_detail_view"),
|
||||
path("collections/<int:pk>/<int:case_number>", views.collection_case_view, name="collection_case_view"),
|
||||
path("condition/", views.ConditionView.as_view(), name="condition_view"),
|
||||
path("categories/", views.categories_list, name="categories_list"),
|
||||
path("condition/<int:pk>", views.condition_detail, name="condition_detail"),
|
||||
path(
|
||||
"condition/<int:pk>/delete",
|
||||
views.ConditionDelete.as_view(),
|
||||
name="condition_delete",
|
||||
),
|
||||
path(
|
||||
"condition/<int:pk>/update",
|
||||
views.ConditionUpdate.as_view(),
|
||||
name="condition_update",
|
||||
),
|
||||
path("subspecialty/", views.SubspecialtyView.as_view(), name="subspecialty_view"),
|
||||
path("subspecialty/<int:pk>", views.subspecialty_detail, name="subspecialty_detail"),
|
||||
path("condition/create", views.ConditionCreate.as_view(), name="condition_create"),
|
||||
path("finding/", views.FindingView.as_view(), name="finding_view"),
|
||||
path("finding/<int:pk>", views.finding_detail, name="finding_detail"),
|
||||
path(
|
||||
"finding/<int:pk>/delete", views.FindingDelete.as_view(), name="finding_delete"
|
||||
),
|
||||
path(
|
||||
"finding/<int:pk>/update", views.FindingUpdate.as_view(), name="finding_update"
|
||||
),
|
||||
path("finding/create", views.FindingCreate.as_view(), name="finding_create"),
|
||||
path("structure/", views.StructureView.as_view(), name="structure_view"),
|
||||
path("structure/<int:pk>", views.structure_detail, name="structure_detail"),
|
||||
path(
|
||||
"structure/<int:pk>/delete",
|
||||
views.StructureDelete.as_view(),
|
||||
name="structure_delete",
|
||||
),
|
||||
path(
|
||||
"structure/<int:pk>/update",
|
||||
views.StructureUpdate.as_view(),
|
||||
name="structure_update",
|
||||
),
|
||||
path("structure/create", views.StructureCreate.as_view(), name="structure_create"),
|
||||
path("series/<int:pk>", views.series_detail, name="series_detail"),
|
||||
path("series/", views.SeriesView.as_view(), name="series_view"),
|
||||
path("series/<int:pk>", views.series_detail, name="series_detail"),
|
||||
path(
|
||||
"series/<int:pk>/<int:finding_pk>",
|
||||
views.series_detail,
|
||||
name="series_edit_finding",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_dicom",
|
||||
views.series_order_dicom,
|
||||
name="series_order_dicom",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/download",
|
||||
views.SeriesImagesZipView.as_view(),
|
||||
name="series_download",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_dicom_instance",
|
||||
views.series_order_dicom_instance,
|
||||
name="series_order_dicom_instance",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_dicom_SeriesInstanceUID",
|
||||
views.series_order_dicom_SeriesInstanceUID,
|
||||
name="series_order_dicom_SeriesInstanceUID",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/order_upload_filename",
|
||||
views.series_order_upload_filename,
|
||||
name="series_order_upload_filename",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/delete",
|
||||
views.SeriesDelete.as_view(),
|
||||
name="series_delete",
|
||||
),
|
||||
# path("unchecked/", views.unchecked_list, name="unchecked_list"),
|
||||
# path("verified/<int:pk>/", views.verified_detail, name="verified_detail"),
|
||||
path("case/<int:pk>/", views.case_detail, name="case_detail"),
|
||||
path("case/<int:pk>/clone", views.AtlasClone.as_view(), name="case_clone"),
|
||||
# path("verified/", views.verified, name="verified"),
|
||||
# path("all_questions/", views.all_questions, name="all_questions"),
|
||||
path("case/<int:pk>/scrap", views.atlas_scrap, name="case_scrap"),
|
||||
path("case/<int:pk>/delete", views.CaseDelete.as_view(), name="case_delete"),
|
||||
path("case/create/", views.AtlasCreate.as_view(), name="create"),
|
||||
path("series/create", views.SeriesCreate.as_view(), name="series_create"),
|
||||
path(
|
||||
"series/<int:pk>/create",
|
||||
views.SeriesCreate.as_view(),
|
||||
name="series_id_create",
|
||||
),
|
||||
path(
|
||||
"case/<int:pk>/update",
|
||||
views.AtlasUpdate.as_view(),
|
||||
name="case_update",
|
||||
),
|
||||
path(
|
||||
"series/<int:pk>/update",
|
||||
views.SeriesUpdate.as_view(),
|
||||
name="series_update",
|
||||
),
|
||||
path(
|
||||
"series/add_finding",
|
||||
views.create_series_findings,
|
||||
name="add_finding",
|
||||
),
|
||||
path(
|
||||
"series/delete_finding/<int:pk>",
|
||||
views.SeriesFindingDelete.as_view(),
|
||||
name="delete_finding",
|
||||
),
|
||||
path(
|
||||
"condition-autocomplete",
|
||||
views.ConditionAutocomplete.as_view(model=Condition, create_field="name"),
|
||||
name="condition-autocomplete",
|
||||
),
|
||||
path(
|
||||
"presentation-autocomplete",
|
||||
views.PresentationAutocomplete.as_view(model=Presentation, create_field="name"),
|
||||
name="presentation-autocomplete",
|
||||
),
|
||||
path(
|
||||
"finding-autocomplete",
|
||||
views.FindingAutocomplete.as_view(model=Finding, create_field="name"),
|
||||
name="finding-autocomplete",
|
||||
),
|
||||
path(
|
||||
"structure-autocomplete",
|
||||
views.StructureAutocomplete.as_view(model=Structure, create_field="name"),
|
||||
name="structure-autocomplete",
|
||||
),
|
||||
path("presentation/", views.PresentationView.as_view(), name="presentation_view"),
|
||||
path("presentation/<int:pk>", views.presentation_detail, name="presentation_detail"),
|
||||
path("process/", views.PathologicalProcessView.as_view(), name="pathological_process_view"),
|
||||
path("process/<int:pk>", views.pathological_process_detail, name="pathological_process_detail"),
|
||||
]
|
||||
|
||||
+918
-918
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user