This commit is contained in:
Ross
2022-04-04 22:06:11 +01:00
parent 4adef5c2c3
commit 0eeb0e832e
26 changed files with 1123 additions and 1099 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
{% block content %} {% block content %}
{% for author in authors %} {% for author in authors %}
<p>Author: <a href="{% url 'atlas:author_detail' pk=author.pk %}">{{author.username}}</a>, </p> <p>Author: <a href="{% url 'atlas:author_detail' pk=author.pk %}">{{author.username}}</a>, </p>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
+11 -11
View File
@@ -1,7 +1,7 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} {% block title %}
Atlas Atlas
{% endblock %} {% endblock %}
{% block css %} {% block css %}
@@ -15,16 +15,16 @@ Atlas
{% block content %} {% block content %}
{% endblock %} {% endblock %}
{% block navigation %} {% block navigation %}
Atlas: Atlas:
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<a href="{% url 'atlas:case_view' %}">Cases</a> / <a href="{% url 'atlas:case_view' %}">Cases</a> /
<a href="{% url 'atlas:series_view' %}">Series</a> / <a href="{% url 'atlas:series_view' %}">Series</a> /
<a href="{% url 'atlas:collection_view' %}">Collections</a> / <a href="{% url 'atlas:collection_view' %}">Collections</a> /
<a href="{% url 'atlas:categories_list' %}">Categories</a> / <a href="{% url 'atlas:categories_list' %}">Categories</a> /
<a href="{% url 'atlas:case_create' %}" title="Create a new atlas case">Create Case</a> / <a href="{% url 'atlas:case_create' %}" title="Create a new atlas case">Create Case</a> /
<a href="{% url 'atlas:series_create' %}" title="Create a new image series">Create Series</a> <a href="{% url 'atlas:series_create' %}" title="Create a new image series">Create Series</a>
{% endif %} {% endif %}
{% comment %} </br> {% comment %} </br>
Questions by: Questions by:
<span id="authors-link"><a href="{% url 'atlas:author_list' %}">author</a></span> {% endcomment %} <span id="authors-link"><a href="{% url 'atlas:author_list' %}">author</a></span> {% endcomment %}
{% endblock %} {% endblock %}
+5 -5
View File
@@ -4,7 +4,7 @@
<div class="floating-header"> <div class="floating-header">
<a href="{% url 'atlas:case_update' pk=case.pk %}" title="Edit the Case">Edit</a> <a href="{% url 'atlas:case_update' pk=case.pk %}" title="Edit the Case">Edit</a>
<a href="{% url 'atlas:case_clone' pk=case.pk %}" <a href="{% url 'atlas:case_clone' pk=case.pk %}"
title="Clone the Case (duplicate everything but the images)">Clone</a> title="Clone the Case (duplicate everything but the images)">Clone</a>
@@ -15,10 +15,10 @@
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="{% url 'admin:atlas_case_change' case.id %}" title="Edit the Case using the admin interface">Admin Edit</a> <a href="{% url 'admin:atlas_case_change' case.id %}" title="Edit the Case using the admin interface">Admin Edit</a>
{% endif %} {% endif %}
</div> </div>
{% include 'atlas/case_display_block.html' %} {% include 'atlas/case_display_block.html' %}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
{% endblock %} {% endblock %}
@@ -111,8 +111,8 @@
{% endfor %} {% endfor %}
</ul> </ul>
</p> </p>
<p class="pre-whitespace"><b>Previous case:</b> {{ case.previous_case }}</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> <p class="pre-whitespace"><b>Next case:</b> {{ case.next_case }}</p>
<div> <div>
{% include 'question_notes.html' %} {% include 'question_notes.html' %}
+13 -13
View File
@@ -4,10 +4,10 @@
{% block css %} {% block css %}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>--> <!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
{{form.media}} {{form.media}}
<script type="text/javascript"> <script type="text/javascript">
function showEditPopup(url) { function showEditPopup(url) {
var win = window.open(url, "Edit", var win = window.open(url, "Edit",
'height=500,width=800,resizable=yes,scrollbars=yes'); 'height=500,width=800,resizable=yes,scrollbars=yes');
@@ -44,14 +44,14 @@
$('#add_more_differential').click(() => { add_differential_input_form() }); $('#add_more_differential').click(() => { add_differential_input_form() });
}) })
</script> </script>
<!-- {{ form.media }} --> <!-- {{ form.media }} -->
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>Submit Case</h2> <h2>Submit Case</h2>
Use this form to create a atlas case. Existing associated image sets can be added using this form. Use this form to create a atlas case. Existing associated image sets can be added using this form.
<form action="" method="post" enctype="multipart/form-data" id="atlas-form"> <form action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %} {% csrf_token %}
<table> <table>
@@ -84,15 +84,15 @@ Use this form to create a atlas case. Existing associated image sets can be adde
</div> </div>
{{ casedifferential_formset.management_form }} {{ casedifferential_formset.management_form }}
<input type="submit" class="submit-button" value="Submit" name="submit"> <input type="submit" class="submit-button" value="Submit" name="submit">
</form> </form>
<div id="empty_series_form" style="display:none"> <div id="empty_series_form" style="display:none">
<ul class='no_error series-formset'> <ul class='no_error series-formset'>
{{ series_formset.empty_form.as_ul }} {{ series_formset.empty_form.as_ul }}
</ul> </ul>
</div> </div>
<div id="empty_casedifferential_form" style="display:none"> <div id="empty_casedifferential_form" style="display:none">
<ul class='no_error casedifferential_formset'> <ul class='no_error casedifferential_formset'>
{{ casedifferential_formset.empty_form.as_ul }} {{ casedifferential_formset.empty_form.as_ul }}
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}
+5 -5
View File
@@ -6,14 +6,14 @@
{% block content %} {% block content %}
<div id="view-filter-options"> <div id="view-filter-options">
<h3>Filter Long </h3> <h3>Filter Long </h3>
<form action="" method="get"> <form action="" method="get">
{{ filter.form }} {{ filter.form }}
<input class="btn btn-primary btn-sm mt-1 mb-1" type="submit" /> <input class="btn btn-primary btn-sm mt-1 mb-1" type="submit" />
</form> </form>
</div> </div>
{% render_table table %} {% render_table table %}
{% endblock %} {% endblock %}
+11 -11
View File
@@ -4,10 +4,10 @@
{% block css %} {% block css %}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>--> <!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
{{form.media}} {{form.media}}
<script type="text/javascript"> <script type="text/javascript">
function add_case_input_form() { function add_case_input_form() {
var form_idx = $('#id_casedetail_set-TOTAL_FORMS').val(); var form_idx = $('#id_casedetail_set-TOTAL_FORMS').val();
$('#case_formset').append($('#empty_case_form').html().replace(/__prefix__/g, form_idx)); $('#case_formset').append($('#empty_case_form').html().replace(/__prefix__/g, form_idx));
@@ -19,13 +19,13 @@
$('#add_more_case').click(() => { add_case_input_form() }); $('#add_more_case').click(() => { add_case_input_form() });
}) })
</script> </script>
<!-- {{ form.media }} --> <!-- {{ form.media }} -->
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>Create Collection</h2> <h2>Create Collection</h2>
Use this form to create a collection of cases Use this form to create a collection of cases
<form action="" method="post" enctype="multipart/form-data" id="atlas-form"> <form action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %} {% csrf_token %}
<table> <table>
@@ -45,10 +45,10 @@ Use this form to create a collection of cases
</div> </div>
{{ case_formset.management_form }} {{ case_formset.management_form }}
<input type="submit" class="submit-button" value="Submit" name="submit"> <input type="submit" class="submit-button" value="Submit" name="submit">
</form> </form>
<div id="empty_case_form" style="display:none"> <div id="empty_case_form" style="display:none">
<ul class='no_error case-formset'> <ul class='no_error case-formset'>
{{ case_formset.empty_form.as_ul }} {{ case_formset.empty_form.as_ul }}
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}
+2 -2
View File
@@ -1,12 +1,12 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
<ul> <ul>
<li><a href="{% url 'atlas:condition_view' %}">Conditions</a></li> <li><a href="{% url 'atlas:condition_view' %}">Conditions</a></li>
<li><a href="{% url 'atlas:finding_view' %}">Findings</a></li> <li><a href="{% url 'atlas:finding_view' %}">Findings</a></li>
<li><a href="{% url 'atlas:structure_view' %}">Structures</li></a> <li><a href="{% url 'atlas:structure_view' %}">Structures</li></a>
<li><a href="{% url 'atlas:subspecialty_view' %}">Subspecialties</li></a> <li><a href="{% url 'atlas:subspecialty_view' %}">Subspecialties</li></a>
<li><a href="{% url 'atlas:presentation_view' %}">Presentations</li></a> <li><a href="{% url 'atlas:presentation_view' %}">Presentations</li></a>
<li><a href="{% url 'atlas:pathological_process_view' %}">Pathological Process</li></a> <li><a href="{% url 'atlas:pathological_process_view' %}">Pathological Process</li></a>
</ul> </ul>
{% endblock %} {% endblock %}
+3 -3
View File
@@ -1,13 +1,13 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
{{category}}: {{category}}:
<ul> <ul>
{% for atlas in atlas %} {% for atlas in atlas %}
<li><a href="{% url 'atlas:case_detail' pk=atlas.pk %}">{{atlas}} <li><a href="{% url 'atlas:case_detail' pk=atlas.pk %}">{{atlas}}
[{{atlas.get_authors}}]</a></li> [{{atlas.get_authors}}]</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}
@@ -1,8 +1,8 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
{% include 'atlas/collection_headers.html' %} {% include 'atlas/collection_headers.html' %}
{% include "generic/exam_cids.html" %} {% include "generic/exam_cids.html" %}
{% endblock %} {% endblock %}
+31 -31
View File
@@ -1,26 +1,26 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
<h2>Case {{case_number|add:1}} <h2>Case {{case_number|add:1}}
{% if collection.show_title %} {% if collection.show_title %}
: {{case.title}} : {{case.title}}
{% endif %} {% endif %}
</h2> </h2>
{% if collection.show_description and case.description%} {% if collection.show_description and case.description%}
<div> <div>
Description: {{case.description}} Description: {{case.description}}
</div> </div>
{% endif %} {% endif %}
{% if collection.show_history and case.history%} {% if collection.show_history and case.history%}
<div> <div>
Description: {{case.history}} Description: {{case.history}}
</div> </div>
{% endif %} {% endif %}
<div class="pre-whitespace multi-image-block"> <div class="pre-whitespace multi-image-block">
{% for series in series_list %} {% for series in series_list %}
<span class="series-block"> <span class="series-block">
<span> <span>
@@ -31,35 +31,35 @@
</span> </span>
</span> </span>
{% endfor %} {% endfor %}
</div> </div>
<div> <div>
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''> <div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
</div> </div>
</div> </div>
{% if collection.show_discussion and case.discussion%} {% if collection.show_discussion and case.discussion%}
<details> <details>
<summary> <summary>
Discussion: Discussion:
</summary> </summary>
<div> <div>
{{case.discussion}} {{case.discussion}}
</div> </div>
</details> </details>
{% endif %} {% endif %}
{% if collection.show_report and case.report%} {% if collection.show_report and case.report%}
<details> <details>
<summary> <summary>
Report: Report:
</summary> </summary>
<div> <div>
{{case.report}} {{case.report}}
</div> </div>
</details> </details>
{% endif %} {% endif %}
{% if take %} {% if take %}
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
<div class="form-contents"> <div class="form-contents">
{% if collection.publish_results %}<fieldset disabled="disabled">{% endif %} {% if collection.publish_results %}<fieldset disabled="disabled">{% endif %}
@@ -85,23 +85,23 @@
<button type="submit" name="finish" class="save btn btn-default">Overview</button> <button type="submit" name="finish" class="save btn btn-default">Overview</button>
<button type="submit" id="goto-button" value="test" name="goto" class="hide">goto</button> <button type="submit" id="goto-button" value="test" name="goto" class="hide">goto</button>
</form> </form>
{% else %} {% else %}
<div> <div>
{% if previous %} {% if previous %}
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:-1 %}">Previous</a> <a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:-1 %}">Previous</a>
{% endif %} {% endif %}
{% if next %} {% if next %}
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:1 %}">Next</a> <a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:1 %}">Next</a>
{% endif %} {% endif %}
</div> </div>
<br /> <br />
Return to <a href='{{collection.get_absolute_url}}'>collection</a> Return to <a href='{{collection.get_absolute_url}}'>collection</a>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<script type="text/javascript"> <script type="text/javascript">
window.images = { window.images = {
{% for series in series_list %} {% for series in series_list %}
{{ forloop.counter0 }}: ["{{ series.get_image_url_array_not_json }}"], {{ forloop.counter0 }}: ["{{ series.get_image_url_array_not_json }}"],
@@ -113,6 +113,6 @@ Return to <a href='{{collection.get_absolute_url}}'>collection</a>
window.loadDicomViewer(window.images[0]) window.loadDicomViewer(window.images[0])
}, 500); }, 500);
}) })
</script> </script>
{% endblock js %} {% endblock js %}
+7 -7
View File
@@ -1,14 +1,14 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
{% include 'atlas/collection_headers.html' %} {% include 'atlas/collection_headers.html' %}
<ul> <ul>
{% for case in collection.cases.all %} {% 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><a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=forloop.counter0 %}">Case {{forloop.counter}}</a>
: {{case.title}} : {{case.title}}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}
@@ -1,17 +1,17 @@
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
Collection: {{collection.name}}-> <a href="{% url 'atlas:collection_detail' pk=collection.pk %}">Overview</a> / Collection: {{collection.name}}-> <a href="{% url 'atlas:collection_detail' pk=collection.pk %}">Overview</a> /
<a href="{% url 'atlas:collection_mark_overview' collection.pk %}">Mark</a> / <a href="{% url 'atlas:collection_mark_overview' collection.pk %}">Mark</a> /
<a href="{% url 'atlas:collection_scores_cid' collection.pk %}">Scores</a> / <a href="{% url 'atlas:collection_scores_cid' collection.pk %}">Scores</a> /
<a href="{% url 'atlas:collection_candidates' collection.pk %}">Candidates</a> <a href="{% url 'atlas:collection_candidates' collection.pk %}">Candidates</a>
<div class="floating-header"> <div class="floating-header">
<a href="{% url 'atlas:collection_update' collection.id %}" title="Edit the Collection">Edit</a> <a href="{% url 'atlas:collection_update' collection.id %}" title="Edit the Collection">Edit</a>
\ <a href="{% url 'atlas:collection_delete' collection.id %}" title="Delete the Collection">Delete</a> \ <a href="{% url 'atlas:collection_delete' collection.id %}" title="Delete the Collection">Delete</a>
{% comment %} \ <a href="{% url 'atlas:collection_clone' collection.id %}" title="Clone the Collection">Clone</a> {% endcomment %} {% comment %} \ <a href="{% url 'atlas:collection_clone' collection.id %}" title="Clone the Collection">Clone</a> {% endcomment %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
\ <a href="{% url 'admin:atlas_casecollection_change' collection.id %}" title="Edit the Collection using the admin interface">Admin Edit</a> \ <a href="{% url 'admin:atlas_casecollection_change' collection.id %}" title="Edit the Collection using the admin interface">Admin Edit</a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
@@ -1,10 +1,10 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
<a href="{% url 'atlas:collection_create' %}">Create collection</a> <a href="{% url 'atlas:collection_create' %}">Create collection</a>
<ul> <ul>
{% for collection in collections %} {% for collection in collections %}
<li><a href='{{collection.get_absolute_url}}'>{{collection.name}}</a></li> <li><a href='{{collection.get_absolute_url}}'>{{collection.name}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock %} {% endblock %}
@@ -1,10 +1,10 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
{% include 'atlas/collection_headers.html' %} {% include 'atlas/collection_headers.html' %}
<div class="vstack gap-3"> <div class="vstack gap-3">
{% for case_detail, answers in case_map.items %} {% for case_detail, answers in case_map.items %}
<div class="border border-dark"> <div class="border border-dark">
<h4>Case: {{case_detail.case.title}}</h4> <h4>Case: {{case_detail.case.title}}</h4>
Answers Answers
@@ -12,19 +12,19 @@
{% for answer in answers %} {% for answer in answers %}
<li {% if not answer.score %}class="flagged"{% endif %}>{{answer.answer}} <li {% if not answer.score %}class="flagged"{% endif %}>{{answer.answer}}
{% if not answer.score %} {% if not answer.score %}
<span class="badge rounded-pill bg-danger">Unmarked</span> <span class="badge rounded-pill bg-danger">Unmarked</span>
{% else %} {% else %}
<span class="badge rounded-pill bg-info">Score: {{answer.score}}</span> <span class="badge rounded-pill bg-info">Score: {{answer.score}}</span>
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<a href="{% url 'atlas:collection_mark_question' collection.pk forloop.counter0 %}">Mark</a> <a href="{% url 'atlas:collection_mark_question' collection.pk forloop.counter0 %}">Mark</a>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% endblock %} {% endblock %}
@@ -3,9 +3,10 @@
{% block content %} {% block content %}
{% include 'atlas/collection_headers.html' %} {% include 'atlas/collection_headers.html' %}
<h3>Marking case: {{case.title}}</h3> <h3>Marking case: {{case.title}}</h3>
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasTop" aria-controls="offcanvasTop">View Case</button>
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
<div class="vstack gap-3"> <div class="vstack gap-3">
{% for answer, form in answer_forms %} {% for answer, form in answer_forms %}
<div class="border border-dark"> <div class="border border-dark">
CID: {{answer.cid}}<br /> CID: {{answer.cid}}<br />
@@ -31,4 +32,24 @@
</form> </form>
<div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel">
<div class="offcanvas-header">
<h5 id="offcanvasTopLabel">Offcanvas top</h5>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
{% for series in series_list %}
<span class="series-block">
<span>
Series {{ forloop.counter }}:
<a href="#" onclick='window.loadDicomViewer(window.images[{{forloop.counter0}}])'>
{{series.get_block}}
</a>
</span>
</span>
{% endfor %}
</div>
</div>
{% endblock %} {% endblock %}
@@ -5,7 +5,7 @@
</div> </div>
{% if editing_finding < 1 %} {% if editing_finding < 1 %}
<button id="add-finding-button">Add finding</button> <button id="add-finding-button">Add finding</button>
{% endif %} {% endif %}
<button id="reset-viewport-button">Reset viewport</button> <button id="reset-viewport-button">Reset viewport</button>
<div id="finding-form"> <div id="finding-form">
+5 -5
View File
@@ -1,10 +1,10 @@
{% extends 'atlas/base.html' %} {% extends 'atlas/base.html' %}
{% block content %} {% block content %}
<h2>{{collection.name}} <h2>{{collection.name}}
<ul> <ul>
</ul> </ul>
{% if collection.collection_type == "REP" %} {% if collection.collection_type == "REP" %}
<h2>Start: {{exam.name}}</h2> <h2>Start: {{exam.name}}</h2>
Enter your CID and passcode in the below boxes.<br /> Enter your CID and passcode in the below boxes.<br />
@@ -48,6 +48,6 @@
}); });
}); });
</script> </script>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
+9 -9
View File
@@ -4,23 +4,23 @@
{% block css %} {% block css %}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>--> <!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
{{form.media}} {{form.media}}
<script type="text/javascript"> <script type="text/javascript">
</script> </script>
<!-- {{ form.media }} --> <!-- {{ form.media }} -->
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>Add/Edit Condition</h2> <h2>Add/Edit Condition</h2>
Use this form to create or edit a condition. Use this form to create or edit a condition.
<form action="" method="post" enctype="multipart/form-data" id="condition-form"> <form action="" method="post" enctype="multipart/form-data" id="condition-form">
{% csrf_token %} {% csrf_token %}
<table> <table>
{{ form.as_table }} {{ form.as_table }}
</table> </table>
<input type="submit" class="submit-button" value="Submit" name="submit"> <input type="submit" class="submit-button" value="Submit" name="submit">
</form> </form>
{% endblock %} {% endblock %}
+9 -9
View File
@@ -4,23 +4,23 @@
{% block css %} {% block css %}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>--> <!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
{{form.media}} {{form.media}}
<script type="text/javascript"> <script type="text/javascript">
</script> </script>
<!-- {{ form.media }} --> <!-- {{ form.media }} -->
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>Add/Edit Finding</h2> <h2>Add/Edit Finding</h2>
Use this form to create or edit a finding. Use this form to create or edit a finding.
<form action="" method="post" enctype="multipart/form-data" id="finding-form"> <form action="" method="post" enctype="multipart/form-data" id="finding-form">
{% csrf_token %} {% csrf_token %}
<table> <table>
{{ form.as_table }} {{ form.as_table }}
</table> </table>
<input type="submit" class="submit-button" value="Submit" name="submit"> <input type="submit" class="submit-button" value="Submit" name="submit">
</form> </form>
{% endblock %} {% endblock %}
@@ -5,7 +5,7 @@
<div class="floating-header"> <div class="floating-header">
{% comment %} <a href="{% url 'atlas:pathological_process_update' pk=pathological_process.pk %}" title="Edit the Condition">Edit</a> {% comment %} <a href="{% url 'atlas:pathological_process_update' pk=pathological_process.pk %}" title="Edit the Condition">Edit</a>
<a href="{% url 'atlas:pathological_process_delete' pk=pathological_process.pk %}" title="Delete the Condition">Delete</a> {% endcomment %} <a href="{% url 'atlas:pathological_process_delete' pk=pathological_process.pk %}" title="Delete the Condition">Delete</a> {% endcomment %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="{% url 'admin:atlas_pathologicalprocess_change' pathological_process.id %}" <a href="{% url 'admin:atlas_pathologicalprocess_change' pathological_process.id %}"
@@ -5,7 +5,7 @@
<div class="floating-header"> <div class="floating-header">
{% comment %} <a href="{% url 'atlas:presentation_update' pk=presentation.pk %}" title="Edit the Condition">Edit</a> {% comment %} <a href="{% url 'atlas:presentation_update' pk=presentation.pk %}" title="Edit the Condition">Edit</a>
<a href="{% url 'atlas:presentation_delete' pk=presentation.pk %}" title="Delete the Condition">Delete</a> {% endcomment %} <a href="{% url 'atlas:presentation_delete' pk=presentation.pk %}" title="Delete the Condition">Delete</a> {% endcomment %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="{% url 'admin:atlas_presentation_change' presentation.id %}" <a href="{% url 'admin:atlas_presentation_change' presentation.id %}"
+13 -13
View File
@@ -3,9 +3,9 @@
{% load static %} {% load static %}
{% block js %} {% block js %}
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>--> <!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
<script type="text/javascript"> <script type="text/javascript">
document.addEventListener('drop', function (e) { e.preventDefault(); }, false); document.addEventListener('drop', function (e) { e.preventDefault(); }, false);
function add_input_form() { function add_input_form() {
@@ -338,15 +338,15 @@
console.log(err); console.log(err);
} }
} }
</script> </script>
{{ form.media }} {{ form.media }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>Add Series</h2> <h2>Add Series</h2>
This form will create a image set that can be associated with a atlas question. If the question has already been created This form will create a image set that can be associated with a atlas question. If the question has already been created
it can be linked below. it can be linked below.
<form action="" method="post" enctype="multipart/form-data" id="atlas-form"> <form action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %} {% csrf_token %}
<a href="/generic/examination/create" id="add_examination" class="add-popup" <a href="/generic/examination/create" id="add_examination" class="add-popup"
onclick="return showAddPopup(this);"><img src="{% static '/img/icon-addlink.svg' %}"></a> onclick="return showAddPopup(this);"><img src="{% static '/img/icon-addlink.svg' %}"></a>
@@ -374,13 +374,13 @@ it can be linked below.
</div> </div>
{{ image_formset.management_form }} {{ image_formset.management_form }}
<input type="submit" class="submit-button" value="Submit" name="submit"> <input type="submit" class="submit-button" value="Submit" name="submit">
</form> </form>
<div id="empty_form" style="display:none"> <div id="empty_form" style="display:none">
<ul class='no_error image-formset'> <ul class='no_error image-formset'>
{{ image_formset.empty_form.as_ul }} {{ image_formset.empty_form.as_ul }}
</ul> </ul>
</div> </div>
<div id="images"> <div id="images">
</div> </div>
{% endblock %} {% endblock %}
+6 -6
View File
@@ -2,19 +2,19 @@
<div>Description: {{series.description}}</div> <div>Description: {{series.description}}</div>
{% if series.case %} {% if series.case %}
Associated case: Associated case:
{% for case in series.case.all %} {% for case in series.case.all %}
<a href="{% url 'atlas:case_detail' pk=case.pk %}">{{case}}</a> <a href="{% url 'atlas:case_detail' pk=case.pk %}">{{case}}</a>
{% endfor %} {% endfor %}
{% else %} {% else %}
This series is not associated with any cases. This series is not associated with any cases.
{% endif %} {% endif %}
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''> <div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''>
</div> </div>
{% if editing_finding < 1 %} {% if editing_finding < 1 %}
<button id="add-finding-button">Add finding</button> <button id="add-finding-button">Add finding</button>
{% endif %} {% endif %}
<button id="reset-viewport-button">Reset viewport</button> <button id="reset-viewport-button">Reset viewport</button>
<div id="finding-form"> <div id="finding-form">
+9 -9
View File
@@ -4,23 +4,23 @@
{% block css %} {% block css %}
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>--> <!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
{{form.media}} {{form.media}}
<script type="text/javascript"> <script type="text/javascript">
</script> </script>
<!-- {{ form.media }} --> <!-- {{ form.media }} -->
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>Add/Edit Structure</h2> <h2>Add/Edit Structure</h2>
Use this form to create or edit a structure. Use this form to create or edit a structure.
<form action="" method="post" enctype="multipart/form-data" id="structure-form"> <form action="" method="post" enctype="multipart/form-data" id="structure-form">
{% csrf_token %} {% csrf_token %}
<table> <table>
{{ form.as_table }} {{ form.as_table }}
</table> </table>
<input type="submit" class="submit-button" value="Submit" name="submit"> <input type="submit" class="submit-button" value="Submit" name="submit">
</form> </form>
{% endblock %} {% endblock %}
+3
View File
@@ -1170,11 +1170,14 @@ def collection_mark_question(request, pk, case_number):
form = CidReportAnswerMarkForm(instance=answer, prefix=answer.pk) form = CidReportAnswerMarkForm(instance=answer, prefix=answer.pk)
answer_forms.append((answer, form)) answer_forms.append((answer, form))
series_list = case.series.all().prefetch_related("images", "examination", "plane")
return render( return render(
request, request,
"atlas/collection_mark_question.html", "atlas/collection_mark_question.html",
{ {
"collection": collection, "collection": collection,
"series_list": series_list,
"answers": answers, "answers": answers,
"case_detail": case_detail, "case_detail": case_detail,
"case": case, "case": case,