From 7595372ca78629e175b37e1aeaecdba246472ee1 Mon Sep 17 00:00:00 2001 From: Rebecca Gorton <52791357+beccagorton182@users.noreply.github.com> Date: Thu, 10 Feb 2022 16:12:46 +0000 Subject: [PATCH] Revert "Csse tool" --- app/assets/javascript/add-letter-code-list.js | 6 +- app/assets/javascript/add-result-code-list.js | 6 +- app/assets/javascript/add-sender-code-list.js | 2 +- app/assets/javascript/suggestionDropdown.js | 39 - app/assets/sass/components/_autocomplete.scss | 279 ++-- app/views/layout-email-base.html | 6 + .../v12/CSSE-tool/CSSE-create-step11.html | 760 +++++++++++ .../v12/CSSE-tool/CSSE-create-step12.html | 643 +++++++++ .../v12/CSSE-tool/CSSE-create-step3.html | 13 +- .../v12/CSSE-tool/CSSE-create-step5.html | 328 ++--- .../v12/CSSE-tool/CSSE-create-step7.html | 90 +- .../v12/CSSE-tool/CSSE-create-step8.html | 13 +- docs/views/template-clinical.html | 2 + docs/views/template.html | 6 + package-lock.json | 508 +------ package.json | 2 +- suggestion-dropdown.patch | 1204 ----------------- 17 files changed, 1730 insertions(+), 2177 deletions(-) delete mode 100644 app/assets/javascript/suggestionDropdown.js create mode 100644 app/views/v12/CSSE-tool/CSSE-create-step11.html create mode 100644 app/views/v12/CSSE-tool/CSSE-create-step12.html delete mode 100644 suggestion-dropdown.patch diff --git a/app/assets/javascript/add-letter-code-list.js b/app/assets/javascript/add-letter-code-list.js index 0d1a2e23..33084c83 100644 --- a/app/assets/javascript/add-letter-code-list.js +++ b/app/assets/javascript/add-letter-code-list.js @@ -14,11 +14,11 @@ letterCodeButton.addEventListener('click', addNumberTolist); //Function to save the nhs number and spit it back out above function addNumberTolist() { - if(document.getElementById('letter-codes-autocomplete').value != "") { - var number = document.getElementById('letter-codes-autocomplete').value; // get value of whats inside the box + if(document.getElementById('autocomplete-customTemplates').value != "") { + var number = document.getElementById('autocomplete-customTemplates').value; // get value of whats inside the box var letterCodelength = letterCodes.push(number) //adds it to the array + adds to new variable letterCodelist.innerHTML+="
  • "+number+" Remove
  • " //spit it back out (with some added extras) - document.getElementById('letter-codes-autocomplete').value="" // clears the box for the next input + document.getElementById('autocomplete-customTemplates').value="" // clears the box for the next input } } diff --git a/app/assets/javascript/add-result-code-list.js b/app/assets/javascript/add-result-code-list.js index 8d9a1ff4..51d2e91b 100644 --- a/app/assets/javascript/add-result-code-list.js +++ b/app/assets/javascript/add-result-code-list.js @@ -7,6 +7,9 @@ //Define empty array where NHS numbers will live when entered var resultCode = [] //Define variables and helps the html talk to the javascript +var resultCodeinput = document.getElementById('result-code-result') +var hpvCodeinput = document.getElementById('result-code-hpv') +var actionCodeinput = document.getElementById('result-code-action') var resultCodelist = document.getElementById('result-code-list') var resultCodeButton = document.getElementById('add-result-code') @@ -15,9 +18,6 @@ resultCodeButton.addEventListener('click', addNumberTolist); //Function to save the nhs number and spit it back out above function addNumberTolist() { - var resultCodeinput = document.getElementById('result-code-result-autocomplete') - var hpvCodeinput = document.getElementById('result-code-hpv-autocomplete') - var actionCodeinput = document.getElementById('result-code-action-autocomplete') var rCode = resultCodeinput.value; // get value of whats inside the box of Result input var hCode = hpvCodeinput.value; // get value of whats inside the box of HPV input var aCode = actionCodeinput.value; // get value of whats inside the box of result input diff --git a/app/assets/javascript/add-sender-code-list.js b/app/assets/javascript/add-sender-code-list.js index 44f10aa9..844f1c86 100644 --- a/app/assets/javascript/add-sender-code-list.js +++ b/app/assets/javascript/add-sender-code-list.js @@ -7,6 +7,7 @@ //Define empty array where NHS numbers will live when entered var senderCodes = [] //Define variables and helps the html talk to the javascript +var senderCodeinput = document.getElementById('sender-code-input') var senderCodelist = document.getElementById('sender-code-list') var senderCodeButton = document.getElementById('add-sender-code') @@ -15,7 +16,6 @@ senderCodeButton.addEventListener('click', addNumberTolist); //Function to save the nhs number and spit it back out above function addNumberTolist() { - var senderCodeinput = document.getElementById('sender-code-input-autocomplete') var number = senderCodeinput.value; // get value of whats inside the box var senderCodelength = senderCodes.push(number) //adds it to the array senderCodelist.innerHTML+="
  • "+number+" Remove
  • " //spit it back out (with some added extras) diff --git a/app/assets/javascript/suggestionDropdown.js b/app/assets/javascript/suggestionDropdown.js deleted file mode 100644 index 48e7c044..00000000 --- a/app/assets/javascript/suggestionDropdown.js +++ /dev/null @@ -1,39 +0,0 @@ - -const createSuggestionDropdown = (data, elementId) => { - function customSuggest(query, syncResults) { - const results = data; - syncResults( - query - ? results.filter(function (result) { - var codeContains = - result.code.toLowerCase().indexOf(query.toLowerCase()) !== -1; - var resultNameContains = - result.name.toLowerCase().indexOf(query.toLowerCase()) !== -1; - return codeContains || resultNameContains; - }) - : [] - ); - } - - function inputValueTemplate(result) { - return result && result.code; - } - - function suggestionTemplate(result) { - return result && `
    ${result.code}
    ${result.name}
    `; - } - - const element = document.querySelector(`#${elementId}`); - const id = `${elementId}-autocomplete`; - accessibleAutocomplete({ - element: element, - id: id, - name: elementId, - displayMenu: 'overlay', - source: customSuggest, - templates: { - inputValue: inputValueTemplate, - suggestion: suggestionTemplate, - }, - }); -} \ No newline at end of file diff --git a/app/assets/sass/components/_autocomplete.scss b/app/assets/sass/components/_autocomplete.scss index f495bf2c..08a1c5a7 100644 --- a/app/assets/sass/components/_autocomplete.scss +++ b/app/assets/sass/components/_autocomplete.scss @@ -2,145 +2,166 @@ // COMPONENTS / AUTOCOMPLETE // ========================================================================== -// needed to add a further wrapper as this +// needed to add a further wrapper as this -.autocomplete__wrapper { - position: relative; -} -.autocomplete__hint, -.autocomplete__input { - @extend .nhsuk-input; - @extend .nhsuk-input--width-10; -} -.autocomplete__input { - background-color: white; - position: relative; -} -.autocomplete__hint { - color: #b1b4b6; - position: absolute; -} -.autocomplete__input--default { - padding: 5px; -} -.autocomplete__input--show-all-values { - padding: 5px 34px 5px 5px; - cursor: pointer; -} -.autocomplete__dropdown-arrow-down { - z-index: -1; - display: inline-block; - position: absolute; - right: 8px; - width: 24px; - height: 24px; - top: 10px; -} -.autocomplete__menu { - background-color: #fff; - border: 2px solid #0b0c0c; - border-top: 0; - color: #0b0c0c; - margin: 0; - max-height: 342px; - overflow-x: hidden; - padding: 0; - width: 100%; - width: calc(100% - 4px); -} -.autocomplete__menu--visible { - display: block; -} -.autocomplete__menu--hidden { - display: none; -} -.autocomplete__menu--overlay { - box-shadow: rgba(0, 0, 0, 0.256863) 0 2px 6px; - left: 0; - position: absolute; - top: 100%; - z-index: 100; - min-width: 500px; -} -.autocomplete__menu--inline { - position: relative; -} -.autocomplete__option { - border-bottom: solid #b1b4b6; - border-width: 1px 0; - cursor: pointer; - display: flex; - position: relative; -} -.autocomplete__option > * { - pointer-events: none; -} -.autocomplete__option:first-of-type { - border-top-width: 0; -} -.autocomplete__option:last-of-type { - border-bottom-width: 0; -} -.autocomplete__option--odd { - background-color: #fafafa; -} -.autocomplete__option--focused, -.autocomplete__option:hover { - background-color: #1d70b8; - border-color: #1d70b8; - color: #fff; - outline: 0; -} -.autocomplete__option--focused .autocomplete__option-name, -.autocomplete__option:hover .autocomplete__option-name { - color:#fff; - -} -.autocomplete__multiple-input { - display: flex; -} -@media (-ms-high-contrast: active), (forced-colors: active) { +.codecomplete { + .autocomplete__wrapper { + position: relative; + border-radius: 4px; + background-color: $color_nhsuk-white; + } + + .autocomplete__hint, + .autocomplete__input { + background-color: $color_nhsuk-white; + border-radius: 4px; + height: 40px; + font-size: 17px; + line-height: 1.5; + -webkit-appearance: none; + border: 2px solid #4c6272; + border-radius: 0; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + margin-bottom: 0; + width: 100%; + } + + .autocomplete__input { + background-color: transparent; + position: relative; + } + + .autocomplete__hint { + color: #bfc1c3; + position: absolute; + } + + .autocomplete__input--default { + padding: 8px; + } + + .autocomplete__input--focused { + outline-offset: 0; + outline: 3px solid #ffeb3b; + } + + .autocomplete__input--show-all-values { + padding: 4px 34px 4px 4px; + cursor: pointer; + } + + .autocomplete__dropdown-arrow-down { + z-index: -1; + display: inline-block; + position: absolute; + right: 8px; + width: 24px; + height: 24px; + top: 10px; + } + .autocomplete__menu { - border-color: FieldText; + background-color: #fff; + border: 4px solid #0b0c0c; + border-top: 0; + color: #34384b; + margin: 0; + max-height: 342px; + overflow-x: hidden; + padding: 0; + width: 100%; + width: calc(100% - 4px); + } + + .autocomplete__menu--visible { + display: block; + } + + .autocomplete__menu--hidden { + display: none; } + + .autocomplete__menu--overlay { + box-shadow: rgba(0,0,0,.256863) 0 2px 6px; + left: 0; + position: absolute; + top: 100%; + z-index: 100; + } + + .autocomplete__menu--inline { + position: relative; + } + .autocomplete__option { - background-color: Field; - color: FieldText; + border-bottom: solid #bfc1c3; + border-width: 1px 0; + cursor: pointer; + display: block; + position: relative; + } + + .autocomplete__option > * { + pointer-events: none; + } + + .autocomplete__option:first-of-type { + border-top-width: 0; + } + + .autocomplete__option:last-of-type { + border-bottom-width: 0; + } + + .autocomplete__option--odd { + background-color: #fafafa; } + .autocomplete__option--focused, .autocomplete__option:hover { - forced-color-adjust: none; - background-color: SelectedItem; - border-color: SelectedItem; - color: SelectedItemText; - outline-color: SelectedItemText; + background-color: #005ea5; + border-color: #005ea5; + color: #fff; + outline: 0; } -} -.autocomplete__option--no-results { - background-color: #fafafa; - color: #646b6f; - cursor: not-allowed; -} -.autocomplete__hint, -.autocomplete__input, -.autocomplete__option { - font-size: 16px; - line-height: 1.25; - margin-bottom: 0; -} -.autocomplete__hint, -.autocomplete__option { - padding: 5px; -} -.autocomplete__option-name { - margin-left: 1em; - color: #4C6272; -} -@media (min-width: 641px) { + + .autocomplete__option--no-results { + background-color: #fafafa; + color: #646b6f; + cursor: not-allowed; + } + .autocomplete__hint, .autocomplete__input, .autocomplete__option { - font-size: 19px; - line-height: 1.31579; + font-size: 17px; + line-height: 1.5; } + + .autocomplete__hint, + .autocomplete__option { + padding: 8px; + } + @media (min-width:641px) { + .autocomplete__hint, + .autocomplete__input, + .autocomplete__option { + font-size: 17px; + line-height: 1.5; + } + } + + + .autocomplete__input { + &:focus { + box-shadow: 0 0 0 4px #ffeb3b; + outline: 4px solid transparent; + outline-offset: 4px; + border: 4px solid black; + } + } + } + diff --git a/app/views/layout-email-base.html b/app/views/layout-email-base.html index 2e51f73d..b76ce8f1 100644 --- a/app/views/layout-email-base.html +++ b/app/views/layout-email-base.html @@ -5,7 +5,9 @@ {% from 'action-link/macro.njk' import actionLink %} +{% from 'nav-a-z/macro.njk' import azNav %} {% from 'breadcrumb/macro.njk' import breadcrumb %} +{% from 'care-card/macro.njk' import careCard %} {% from 'contents-list/macro.njk' import contentsList %} {% from 'details/macro.njk' import details %} {% from 'header/macro.njk' import header %} @@ -14,7 +16,11 @@ {% from 'do-dont-list/macro.njk' import list %} {% from 'images/macro.njk' import image %} {% from 'inset-text/macro.njk' import insetText %} +{% from 'list-panel/macro.njk' import listPanel %} {% from 'pagination/macro.njk' import pagination %} +{% from 'panel/macro.njk' import panel %} +{% from 'promo/macro.njk' import promo %} +{% from 'review-date/macro.njk' import reviewDate %} {% from 'skip-link/macro.njk' import skipLink %} {% from 'tables/macro.njk' import table %} {% from 'warning-callout/macro.njk' import warningCallout %} diff --git a/app/views/v12/CSSE-tool/CSSE-create-step11.html b/app/views/v12/CSSE-tool/CSSE-create-step11.html new file mode 100644 index 00000000..6282aab1 --- /dev/null +++ b/app/views/v12/CSSE-tool/CSSE-create-step11.html @@ -0,0 +1,760 @@ +{% extends "layout-v2.html" %} + +{% block pageScripts %} + + + + + +{% endblock %} +{% block pageTitle %} +NHS Cervical screening management system +{% endblock %} + +{% block header %} +{% include '../components/header.html' %} +{% endblock %} + + +{% block content %} +
    +
    + + + + Step 11 of 12 + +
    +
    + + + +
    + +

    + Review report +

    +
    + +

    + You can check the sections you have filled in and make changes +

    + + +
    + +

    + Step 1: Enquiry name +

    + +
    +
    + Name +
    +
    + {% if data['create-name'] %}{{ data['create-name'] }}{% else %}HPV data report{% endif %} +
    + +
    + + + Change name + + +
    + +
    + + +
    + +
    + +

    + Step 2: Define data type +

    + +
    +
    + Include patient data +
    +
    + {% if data['patient-data'] %}{{ data['patient-data'] }}{% else %}Yes, include patient data{% endif %} +
    + +
    + + + Change include patient data + + +
    + +
    + +
    +
    + Include test data +
    +
    + {% if data['test-data'] %}{{ data['test-data'] }}{% else %}Yes, include test data{% endif %} +
    + +
    + + + Change include test data + + +
    + +
    + + +
    + +
    + +

    + Step 3: Define test +

    + +
    +
    + Test criteria +
    +
    +
      + {% for item in data['test-criteria'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    • {{ data['test-to-include'] }}
    • +
    +
    + +
    + + + Change name + + +
    + +
    + + + +
    + +
    + +

    + Step 4: Define test parameters +

    + +
    +
    + Result type +
    +
    +
      + {% for item in data['result-type'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    + +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + HPV primary status +
    +
    +
      + {% for item in data['hpv-status'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    + +
    + +
    + + + Change name + + +
    + +
    + + +
    + +
    + +

    + Step 5: Define sender details +

    + +
    +
    + National code +
    +
    +
      + {% for item in data['national-code-list'] %} +
    • {{ item }}
    • + {% else %} +
    • 60234, 61558
    • + {% endfor %} +
    + {{ data['national-code-data'] }} +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Source code +
    +
    +
      + {% for item in data['source-code-list'] %} +
    • {{ item }}
    • + {% else %} +
    • H, X, N
    • + {% endfor %} +
    + {{ data['source-code-data'] }} +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Sender code +
    +
    +
      + {% for item in data['sender-code-list'] %} +
    • {{ item }}
    • + {% else %} +
    • A86020, A8640
    • + {% endfor %} +
    + {{ data['sender-code-data'] }} +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Source type +
    +
    +
      + {% for item in data['source-type-list'] %} +
    • {{ item }}
    • + {% else %} +
    • 1, 4, 7
    • + {% endfor %} +
    + {{ data['source-type-data'] }} +
    + +
    + + + Change name + + +
    + +
    + + +
    + +
    + +

    + Step 6: Define test result details +

    + +
    +
    + Date type +
    +
    +
      +
    • {{ data['date-type']}}
    • +
    • {{ data['from-test-taken-date-day'] }}{{ data['from-prev-noti-date-day'] }}{{ data['from-prev-invi-date-day'] }}{{ data['from-test-inp-date-day'] }}-{{ data['from-test-taken-date-month'] }}{{ data['from-prev-noti-date-month'] }}{{ data['from-prev-invi-date-month'] }}{{ data['from-test-inp-date-month'] }}-{{ data['from-test-taken-date-year'] }}{{ data['from-prev-noti-date-year'] }}{{ data['from-prev-invi-date-year'] }}{{ data['from-test-inp-date-year'] }} - {{ data['to-test-taken-date-day'] }}{{ data['to-prev-noti-date-day'] }}{{ data['to-prev-invi-date-day'] }}{{ data['to-test-inp-date-day'] }}-{{ data['to-test-taken-date-month'] }}{{ data['to-prev-noti-date-month'] }}{{ data['to-prev-invi-date-month'] }}{{ data['to-test-inp-date-month'] }}-{{ data['to-test-taken-date-year'] }}{{ data['to-prev-noti-date-year'] }}{{ data['to-prev-invi-date-year'] }}{{ data['to-test-inp-date-year'] }}
    • +
    • +
    +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Slide number range +
    +
    +
      +
    • {{ data['slide-num-year'] }} {{ data['slide-num-num'] }} - {{ data['slide-num-year-to'] }} {{ data['slide-num-num-to'] }}
    • +
    • +
    +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Result code +
    +
    +
      + {% for item in data['result-code-list'] %} +
    • {{ item }}
    • + {% else %} +
    • X0A, X
    • + {% endfor %} +
    + {{ data['result-code-data'] }} +
    + +
    + + + Change name + + +
    + +
    + + +
    + +
    + +

    + Step 7: Define participant and episode status details +

    + +
    +
    + Participant status +
    +
    +
      + {% for item in data['current-participant-status'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    + +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Episode status +
    +
    +
      + {% for item in data['current-episode-status'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    + +
    + +
    + + + Change name + + +
    + +
    + + +
    + +
    + +

    + Step 8: Define location details +

    + +
    +
    + GP practice code +
    +
    +
      + {% for item in data['gp-practice-code-list'] %} +
    • {{ item }}
    • + {% else %} +
    • A1000000, A110100
    • + {% endfor %} +
    + {{ data['gp-code-data'] }} +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Patient post code +
    +
    +
      + {% for item in data['post-code-list'] %} +
    • {{ item }}
    • + {% else %} +
    • LS1, LS25
    • + {% endfor %} +
    + {{ data['post-code-data'] }} +
    + +
    + + + Change name + + +
    + +
    + + +
    + +
    + +

    + Step 9: Define patient details +

    + +
    +
    + Registration status +
    +
    +
      + {% for item in data['patient-reg'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Cervix status +
    +
    +
      + {% for item in data['cervix-status'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    +
    + +
    + + + Change name + + +
    + +
    + + + +
    +
    + Data type +
    +
    +
      +
    • {{ data['patient-date-type'] }}
    • +
    • {{ data['registered-date-from-day'] }}{{ data['deducted-date-from-day'] }}-{{ data['registered-date-from-month'] }}{{ data['deducted-date-from-month'] }}-{{ data['registered-date-from-year'] }}{{ data['deducted-date-from-year'] }} - {{ data['registered-date-to-day'] }}{{ data['deducted-date-to-day'] }}-{{ data['registered-date-to-month'] }}{{ data['deducted-date-to-month'] }}-{{ data['registered-date-to-year'] }}{{ data['deducted-date-to-year'] }}
    • +
    +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Age range +
    +
    + {{ data['age-from-input'] }} - {{ data['age-to-input'] }} +
    + +
    + + + Change name + + +
    + +
    + +
    +
    + Date type +
    +
    +
      +
    • {{ data['recall-date-type'] }}
    • +
    • {{ data['next-test-date-from-day'] }}{{ data['last-noti-date-from-day'] }}{{ data['last-invi-date-from-day'] }}-{{ data['next-test-date-from-month'] }}{{ data['last-noti-date-from-month'] }}{{ data['last-invi-date-from-month'] }}-{{ data['next-test-date-from-year'] }}{{ data['last-noti-date-from-year'] }}{{ data['last-invi-date-from-year'] }} - {{ data['next-test-date-to-day'] }}{{ data['last-noti-date-to-day'] }}{{ data['last-invi-date-to-day'] }}-{{ data['next-test-date-to-month'] }}{{ data['last-noti-date-to-month'] }}{{ data['last-invi-date-to-month'] }}-{{ data['next-test-date-to-year'] }}{{ data['last-noti-date-to-year'] }}{{ data['last-invi-date-to-year'] }}
    • +
    +
    + +
    + + + Change name + + +
    + +
    + + + +
    + +
    + +

    + Step 10: Define communication details +

    + +
    +
    + Notification type +
    +
    +
      +
    • {{ data['comms-notification-type'] }}:
    • + {% for item in data['comms-recall-type'] %} +
    • {{ item }}
    • + {% else %} +
    • No criteria set
    • + {% endfor %} +
    +
    + +
    + + + Change notification type + + +
    + +
    + +
    +
    + Notification date range +
    +
    + {{ data['comms-noti-date-from-day'] }}-{{ data['comms-noti-date-from-month'] }}-{{ data['comms-noti-date-from-year'] }} - {{ data['comms-noti-date-to-day'] }}-{{ data['comms-noti-date-to-month'] }}-{{ data['comms-noti-date-to-year'] }} +
    + +
    + + + Change notification date range + + +
    + +
    + +
    +
    + Letter code +
    +
    +
      + {% for item in data['letter-code-list'] %} +
    • {{ item }}
    • + {% else %} +
    • 1QR, 0QS
    • + {% endfor %} +
    + {{ data['letter-code-data'] }} +
    + +
    + + + Change letter code + + +
    + +
    + + + +
    + + + +
    + + +
    + +
    + +
    +
    +{% endblock %} diff --git a/app/views/v12/CSSE-tool/CSSE-create-step12.html b/app/views/v12/CSSE-tool/CSSE-create-step12.html new file mode 100644 index 00000000..685f1d7b --- /dev/null +++ b/app/views/v12/CSSE-tool/CSSE-create-step12.html @@ -0,0 +1,643 @@ +{% extends "layout-v2.html" %} + +{% block pageScripts %} + + + + + +{% endblock %} +{% block pageTitle %} +NHS Cervical screening management system +{% endblock %} + +{% block header %} +{% include '../components/header.html' %} +{% endblock %} + + +{% block content %} +
    +
    + + + + Step 12 of 12 + +
    +
    + +
    + +

    + File format +

    +
    + +

    + Choose which fields you want to include from the output file for {% if data['create-name'] %}{{ data['create-name'] }}.csv{% else %}HPV data report{% endif %} +

    + +
    + + + Patient data + + +
    + +
    + +

    + Which patient data do you want to include? +

    +
    + +
    + +
    + + +
    + + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + + + + + + + + + + + + + + + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + +
    + + +
    + + + + + +
    + + +
    + + + +
    + + +
    + +
    +
    + +
    + + + Practice data + + +
    + +
    + +

    + Which practice data do you want to include? +

    +
    + +
    + +
    + + +
    + + + + + +
    + + +
    + + + +
    + + +
    + +
    + + +
    + + + +
    + + +
    + +
    +
    + +
    + + + Participant and episode data + + +
    + +
    + +

    + Which participant and episode data do you want to include? +

    +
    + +
    + +
    + + +
    + + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + +
    + + +
    + +
    +
    + +
    + + + Test data + + +
    + +
    + +

    + Which test data do you want to include? +

    +
    + +
    + +
    + + +
    + + +
    + + +
    + + + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + + + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + + +
    + + +
    + + + + + +
    + +
    +
    +{% endblock %} diff --git a/app/views/v12/CSSE-tool/CSSE-create-step3.html b/app/views/v12/CSSE-tool/CSSE-create-step3.html index 560f92aa..2abcae45 100644 --- a/app/views/v12/CSSE-tool/CSSE-create-step3.html +++ b/app/views/v12/CSSE-tool/CSSE-create-step3.html @@ -51,18 +51,21 @@

    - -
    + +
    - -
    -
    + + diff --git a/app/views/v12/CSSE-tool/CSSE-create-step5.html b/app/views/v12/CSSE-tool/CSSE-create-step5.html index ea39b7cc..5e5bbc4c 100644 --- a/app/views/v12/CSSE-tool/CSSE-create-step5.html +++ b/app/views/v12/CSSE-tool/CSSE-create-step5.html @@ -6,238 +6,92 @@ - + function customSuggest (query, syncResults) { + var results = [ + { code: 'PA1', result: 'HPV Primary screening invitation', recall: 'Invitation letter' }, + { code: 'PA2', result: 'HPV Primary screening reminder', recall: 'Invitation letter'}, + { code: 'PA3', result: 'HPV Primary screening invitation (participant not registered with GP', recall: 'Invitation letter' }, + { code: 'PA4', result: 'HPV Primary screening reminder (participant not registered with GP', recall: 'Invitation letter' }, + { code: 'PX0A', result: 'HPV negative result with no cytology', recall: 'Normal result letter' }, + { code: 'PX0C', result: 'HPV negative result and ceased for age', recall: 'Normal result letter' }, + { code: 'PX0R', result: 'HPV negative result with early recall (12 or 36 months)', recall: 'Normal result letter' }, + { code: 'PX0S', result: 'HPV negative result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'PXUS', result: 'Inadequate HPV result (no cytology) with referral to colposcopy', recall: 'Abnormal result letter'}, + { code: 'PXUR', result: 'Inadequate HPV result (no cytology)', recall: 'Normal result letter'}, + { code: 'PX9S', result: 'HPV positive result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P09R', result: 'HPV positive, cytology negative and noncervical glandular neoplasia positive result with recall (12 or 36 months)', recall: 'Normal result letter' }, + { code: 'P09S', result: 'HPV positive, cytology negative and noncervical glandular neoplasia positive result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P19R', result: 'HPV positive and inadequate cytology result with early recall (3 months)', recall: 'Normal result letter' }, + { code: 'P19S', result: 'HPV positive and inadequate cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P39S', result: 'HPV positive and low-grade dyskaryosis cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P49S', result: 'HPV positive and high-grade (severe) dyskaryosis cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P59S', result: 'HPV positive and abnormal squamous cytology result with urgent (2 week) referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P69S', result: 'HPV positive and abnormal endocervical cytology result with urgent (2 week) referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P79S', result: 'HPV positive and high-grade (moderate) dyskaryosis cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P89S', result: 'HPV positive and borderline squamous cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P99S', result: 'HPV positive and borderline endocervical cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P29R', result: 'HPV positive and negative cytology result with early recall', recall: 'Normal result letter'}, + { code: 'P29S', result: 'HPV positive and cytology negative with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'CXNC', result: 'Ceasing due to no cervix', recall: 'Ceasing letter'}, + { code: 'CUA', result: 'Automatic ceasing due to age after non-response', recall: 'Ceasing letter'}, + { code: 'CIC', result: 'Ceasing due to informed consent at participant request', recall: 'Ceasing letter'}, + { code: 'CMC', result: 'Ceasing due to Mental Capacity Act at request of third party', recall: 'Ceasing letter'}, + { code: 'CXAN', result: 'Manual ceasing due to age', recall: 'Ceasing letter'}, + { code: 'K-0A', result: 'Negative self sample', recall: 'Normal result letter'}, + { code: 'K-9R', result: 'Positive self sample', recall: 'Abnormal result letter'}, + { code: 'K1UH', result: 'First inadequate self sample', recall: '1st inadequate result letter'}, + { code: 'K2UH', result: 'Second inadequate self sample', recall: '2nd inadequate result letter'}, + { code: 'K-0C', result: 'Ceased self sample', recall: 'Ceasing letter'}, + { code: 'P0QS', result: 'Old code: HPV positive, cytology negative and non-cervical glandular neoplasia positive result with early recall', recall: 'Normal result letter'}, + { code: 'P1QR', result: 'Old code: Cytology negative and non-cervical glandular neoplasia positive result with referral to colposcopy', recall: 'Abnormal result letter'}, + { code: 'P1QS', result: 'Old code: HPV positive and inadequate cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P2QR', result: 'Old code: HPV positive and negative cytology result with early recall', recall: 'Normal result letter'}, + { code: 'P3QS', result: 'Old code: Low-grade dyskaryosis cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P4QS', result: 'Old code: High-grade (severe) dyskaryosis cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P5QS', result: 'Old code: Abnormal squamous cytology result with urgent referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P6QS', result: 'Old code: Abnormal endocervical cytology result with urgent referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P7QS', result: 'Old code: High-grade (moderate) dyskaryosis cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P8QS', result: 'Old code: Borderline squamous cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P9QS', result: 'Old code: Borderline endocervical cytology result with referral to colposcopy', recall: 'Abnormal result letter' }, + { code: 'P2QS', result: 'Old code: Cytology negative with referral to colposcopy', recall: 'Abnormal result letter' }, + + + ] + syncResults(query + ? results.filter(function (result) { + var resultContains = result.code.toLowerCase().indexOf(query.toLowerCase()) !== -1 + var endonymContains = result.result.toLowerCase().indexOf(query.toLowerCase()) !== -1 + return resultContains || endonymContains + }) + : [] + ) + } + + function inputValueTemplate (result) { + return result && result.result + '-' + result.code + } + + function suggestionTemplate (result) { + return result && '' + result.result + '' + + ' (' + result.code + ')' + } + + element = document.querySelector('#my-autocomplete-container') + id = 'autocomplete-customTemplates' + accessibleAutocomplete({ + element: element, + id: id, + name: 'result', + source: customSuggest, + templates: { + inputValue: inputValueTemplate, + suggestion: suggestionTemplate + } + }) + + +