From 125cbef6ef427a82fe08a17d2d4adf1a114c0e34 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 18 Aug 2025 10:18:12 +0100 Subject: [PATCH] Enhance case display with improved button interactions and add detailed instructions for reordering dicoms in help section --- atlas/templates/atlas/case_display_block.html | 118 ++++++++++-------- atlas/templates/atlas/help.html | 14 +++ 2 files changed, 83 insertions(+), 49 deletions(-) diff --git a/atlas/templates/atlas/case_display_block.html b/atlas/templates/atlas/case_display_block.html index f3fd94f6..8aaf2971 100755 --- a/atlas/templates/atlas/case_display_block.html +++ b/atlas/templates/atlas/case_display_block.html @@ -160,9 +160,17 @@ {% partial case-series %} - Import new uploads
+
- + Manage Series + + + Create and add new series
- - - - {% if finding.findings %} - - Findings: {% for f in finding.findings.all %} - {{f.get_link}},  - {% endfor %} - - {% endif %} - {% if finding.conditions %} - - Conditions: {% for c in finding.conditions.all %} - {{c.get_link}},  - {% endfor %} - - {% endif %} - {% if finding.structures %} - - Structure: {% for s in finding.structures.all %} - {{s.get_link}},  - {% endfor %} - - {% endif %} - {% if finding.description %} - - Description: {{finding.description}} - - {% endif %} - - {% endfor %} - {% endfor %} -{% else %} - No series associated with case. -{% endif %} +
Series Findings
+ {% if case.ordered_series %} + {% for series in case.ordered_series %} + {% for finding in series.findings.all %} +
+ + + + + + + {% if finding.findings %} + + Findings: {% for f in finding.findings.all %} + {{f.get_link}},  + {% endfor %} + + {% endif %} + {% if finding.conditions %} + + Conditions: {% for c in finding.conditions.all %} + {{c.get_link}},  + {% endfor %} + + {% endif %} + {% if finding.structures %} + + Structure: {% for s in finding.structures.all %} + {{s.get_link}},  + {% endfor %} + + {% endif %} + {% if finding.description %} + + Description: {{finding.description}} + + {% endif %} +
+ {% endfor %} + {% endfor %} + {% else %} + No series associated with case. + {% endif %}
Case Display Sets
@@ -545,7 +553,7 @@ // On submit, update the hidden inputs to match the new order document.getElementById("reorder-series-form").addEventListener("submit", function(e) { - const lis = document.querySelectorAll("#series-reorder-list li"); + const lis = document.querynelectorAll("#series-reorder-list li"); lis.forEach((li, idx) => { li.querySelector("input[name='series_order']").setAttribute("name", "series_order_" + idx); }); @@ -616,6 +624,12 @@ btn.classList.toggle("btn-primary", checkbox.checked); btn.classList.toggle("btn-outline-primary", !checkbox.checked); btn.textContent = checkbox.checked ? "Selected" : "Select"; + // Highlight the series-block when selected + if (checkbox.checked) { + parent.classList.add("highlight-series"); + } else { + parent.classList.remove("highlight-series"); + } }); }); @@ -713,4 +727,10 @@ #series-reorder-list .drag-over { border-top: 2px solid #0d6efd; } + .series-actions[open] { + border: 2px solid #0d6efd; + border-radius: 6px; + padding: 8px; + margin-top: 8px; + } \ No newline at end of file diff --git a/atlas/templates/atlas/help.html b/atlas/templates/atlas/help.html index ba40b47e..21632630 100644 --- a/atlas/templates/atlas/help.html +++ b/atlas/templates/atlas/help.html @@ -56,5 +56,19 @@

To do so you will have to first export the files from the PACs system.

Once uploaded the series will be available to be imported into cases +

Cases

+

Ordering dicoms within a series

+

Depending on how dicoms are exported images within a stack may appear in the wrong order. This is apparent when viewing the stacks/series as jumping of images.

+

In most cases this can be fixed by re-ordering based on series metadata (usually slice location).

+

It is possible to reorder all the stacks in a case at once, or to reorder individual stacks.

+

Reorder all stacks in a case

+

Go to the case page, click "Manage Series" then "Order dicoms by slice location". This will reorder all the stacks in the case based on slice location.

+

Reorder individual stacks

+

More ordering options (if the above does not work) are available on the series page.

+

These can be accessed by opening the "Series info" section and selecting the appropriate button.

+ + + + {% endblock %}