{% extends 'atlas/base.html' %}

{% block content %}

    <h2>Anatomy of the Atlas</h2>

    The atlas consists of a number of different constituent parts.

    <h3>Series</h3>
    <p>A series is a stack of images. They should consist of a single modality, and be of the same body part and aquired at the same time. For example, a CT scan of the head, or an MRI of the knee. </p>

    <p>Each series can be associated with an arbitary number of cases.</p>

    <h3>Cases</h3>
    <p>A case is the basic unit of the atlas. It should consist of one or more series, and be associated with a single patient.</p>

    <p>Additional information can be added to a case, such as history, description, report, diagnosis and differential.</p>

    <h3>Collection</h3>
    <p>A collection is a group of cases. It can be used to group cases. Cases can below to more than one group.</p>

    <p>A number of different collection types are available, including:</p>
    <ul>
        <li>Review</li>
        <li>Report</li>
        <li>Question</li>
        <li>Viva</li>
    </ul>
    <h5>Review</h5>
    <p>A Review collection is used to group cases for the purpose of review or teaching sessions. It allows users to easily access a curated set of cases. No data is collected as part of the review, although it is possible for users to add a "Self Review" component.</p>

    <h5>Report</h5>
    <p>A Report collection is designed for cases that users are expected to complete a report for. This can be used for audit, teaching, or assessment purposes.</p>

    <h5>Question</h5>
    <p>A Question collection contains cases that are used for quiz or question-based learning. These cases may have associated questions and answers for self-assessment or examination.</p>

    <h5>Viva</h5>
    <p>A Viva collection is intended for oral examination practice. Cases in this collection can be used to simulate viva-style assessments. These are designed to be presented by the "examiner" and features a number of features to make this as easy as possible.</p>

    <h5>Viva (Local Viewer)</h5>
    <p>The local viva view opens a linked DV3D viewer in a separate window and lets you load complete cases, individual series, resources, and display sets without leaving the control page.</p>
    <p>Use "Open Viewer Local" first, then use the Load buttons in the cases panel. The right-hand current-case panel tracks the active case details and injected question block for discussion.</p>
    <p>Use "Enable Edit Mode" in the local viva page when you need quick access to case, series, or display-set edit links during preparation.</p>

    <h2>Uploading/creating cases</h2>
    <p>If set up, the easiest way to upload cases is to use the uploader tool. This can export, anonnyimize and upload cases from Insignia Insight, however it may need setting up manually. If this is not possible you can upload files directly to the site.</p>
    <div class="alert alert-warning" role="alert">
        <strong>Note:</strong> Due to restrictions in Insight, it is not possible to export DICOM files from teaching folders. It is possible to export JPG/PNG files which can be uploaded and will function, but as they do not store the full range of DICOM/pixel data, some functionality will be limited (e.g. windowing/levelling will be restricted, automatic ordering will not be possible).
    </div>
    <h3>Setting up the Uploader tool</h3>
    Requirements: Full Insight installation (not WebPacs)
    <h5>Step 1: Download the uploader tool</h4>
    This is available <a href="https://www.penracourses.org.uk/uploader/anon_gui.exe">here</a>
    <h5>Step 2: Download insight integration xml file</h4>
    Available <a href="https://www.penracourses.org.uk/uploader/insight_rad_up.xml">here</a>
    <h5>Step 3: Integrate the uploader with PACs</h4>
    Whilst in PACs open the settings menu with the keyboard shortcut 'Ctrl+Shift+C'. In the 'General' tab, select 'External Tools' and click 'Add'. Press the Import button and select the xml file you downloaded in Step 2. Modify the file to run path to point the uploader exe downloaded in step 1 (clicking on the 3 dots will allow you to browse and select this file). The remaining fields should have been set via the xml file and should not require modification.
    <h3>Uploading without the uploader tool</h3>
    <p>If you have <b>annonymised</b> dicom files already exported you can uploading them directly on this page using this <a href='{% url "atlas:new_uploads" %}'>page</a></p>
    <p>To do so you will have to first export the files from the PACs system.</p>
    <p>Once uploaded the series will be available to be imported into cases

        <h2>Cases</h2>
        <h3>Ordering dicoms within a series</h3>
        <p>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.</p>
        <p>In most cases this can be fixed by re-ordering based on series metadata (usually slice location).</p>
        <p>It is possible to reorder all the stacks in a case at once, or to reorder individual stacks.</p>
        <h4>Reorder all stacks in a case</h4>
        <p>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.</p>
        <h4>Reorder individual stacks</h4>
        <p>More ordering options (if the above does not work) are available on the series page.</p>
        <p>These can be accessed by opening the "Series info" section and selecting the appropriate button.</p>




    <h3>Surveys & Feedback</h3>
    <p>The platform supports reusable, shareable, and mandatory feedback forms and surveys that can be configured by administrators to assess educational improvement and collect feedback.</p>
    
    <h5>Managing Surveys (Staff/Admins)</h5>
    <ul>
        <li><strong>Create Surveys:</strong> Navigate to the <em>Survey Dashboard</em> to create a survey, customize its name, description, decide if responses should be anonymous, and specify:
            <ul>
                <li><em>Before Text:</em> Custom instructions shown to candidates before they begin.</li>
                <li><em>After Text:</em> Custom thank-you message shown upon submission.</li>
            </ul>
        </li>
        <li><strong>Question Types & Validation:</strong> You can add questions of multiple types:
            <ul>
                <li><em>Free Text:</em> For qualitative comments.</li>
                <li><em>Multiple Choice:</em> For single-select options (entered one option per line).</li>
                <li><em>Rating Scale:</em> 1-to-5 Likert scale ratings.</li>
                <li><em>Integer / Number:</em> Enforces numerical input. You can set custom minimum/maximum validation rules.</li>
                <li><em>Date:</em> Enforces date input using a calendar picker. You can configure custom minimum/maximum date range limits.</li>
            </ul>
        </li>
        <li><strong>Mandatory & Optional Flows:</strong> You can assign surveys as <em>Pre-take</em> or <em>Post-take</em> surveys in collection/exam edit screens:
            <ul>
                <li><em>Mandatory:</em> Candidates must fill out the pre-survey to start, and must fill out the post-survey before they can view their results/scores.</li>
                <li><em>Optional:</em> Candidates will be prompted to fill out the surveys, but can choose to skip them using the "Skip Survey" option.</li>
            </ul>
        </li>
        <li><strong>Analytics & CSV Export:</strong> The <em>Analytics Dashboard</em> displays rating averages, progress bar breakdowns, integer statistics, and text answers. You can filter results by survey source (Pre-take, Post-take, or Standalone) and target exams/collections. Results can be exported as a filtered CSV.</li>
    </ul>

    <h5>Taking Standalone/General Surveys</h5>
    <p>Surveys can also be distributed as standalone links (e.g. <code>/survey/take/&lt;id&gt;/</code>) for general platform feedback or course evaluation not tied to a specific exam.</p>

{% endblock %}
