Skip to content

IRMER authorisation – change content on medical info button - #401

Open
rivalee wants to merge 5 commits into
mainfrom
irmer-authorise
Open

IRMER authorisation – change content on medical info button#401
rivalee wants to merge 5 commits into
mainfrom
irmer-authorise

Conversation

@rivalee

@rivalee rivalee commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

This updates the content on the medical information page to cover IRMER authorisation, both for when the mammographer has permission to authorise, and when they need to sign the authorisation with another mammographer's name.

When the mammographer has permission to authorise imaging

Screenshot 2026-08-18 at 14 56 16

When the mammographer doesn't have permission and needs to authorise using another's name

  • Choose authoriser
Screenshot 2026-08-20 at 15 07 25 Screenshot 2026-08-20 at 15 07 35 Screenshot 2026-08-20 at 15 07 44

@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-irmer-auth-qtduvv August 10, 2026 12:53 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-irmer-auth-qtduvv August 10, 2026 13:56 Inactive
@edwardhorsford
edwardhorsford temporarily deployed to manage-breas-irmer-auth-qtduvv August 12, 2026 09:55 Inactive
@rivalee
rivalee marked this pull request as ready for review August 18, 2026 13:55
updateProgress(sections, completedSections)

// Handle "Complete all and continue" button
// Handle "Authorise" button

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Handle "Authorise" button
// Handle "Complete all and continue" button

function highlightCompletionButton() {
const completeButton = document.querySelector(
'button:contains("Complete all and continue")'
'button:contains("Authorise")'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'button:contains("Authorise")'
'button:contains("Complete all and continue")'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to inform users of what happens when clicking this button - switching to 'Authorise' removes this, creating risk they would skip some of the medical info steps.

For qualified users, we should include copy associated to the button rather than changing the button itself


buttons.forEach((btn) => {
if (btn.textContent.includes('Complete all and continue')) {
if (btn.textContent.includes('Authorise')) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (btn.textContent.includes('Authorise')) {
if (btn.textContent.includes('Complete all and continue')) {


await page
.getByRole('button', { name: 'Complete all and continue' })
.getByRole('button', { name: 'Authorise' })

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.getByRole('button', { name: 'Authorise' })
.getByRole('button', { name: 'Complete all and continue' })

).toBeVisible()
await page
.getByRole('button', { name: 'Complete all and continue' })
.getByRole('button', { name: 'Authorise' })

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.getByRole('button', { name: 'Authorise' })
.getByRole('button', { name: 'Complete all and continue' })

</div>
{% else %}
{{ button({
text: "Authorise and continue",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
text: "Authorise and continue",
text: "Complete all and continue",

text: "Authorise and continue",
classes: "js-complete-all-sections nhsuk-u-margin-bottom-0"
}) }}
<p class="nhsuk-body-s nhsuk-u-secondary-text-color nhsuk-u-margin-top-2 nhsuk-u-margin-bottom-5">This will authorise imaging by {{ data.currentUser.firstName }} {{ data.currentUser.lastName }}</p>

@dannychadburn dannychadburn Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p class="nhsuk-body-s nhsuk-u-secondary-text-color nhsuk-u-margin-top-2 nhsuk-u-margin-bottom-5">This will authorise imaging by {{ data.currentUser.firstName }} {{ data.currentUser.lastName }}</p>
<p class="nhsuk-body-s nhsuk-u-secondary-text-color nhsuk-u-margin-top-2 nhsuk-u-margin-bottom-5">By continuing, you ({{ data.currentUser.firstName }} {{ data.currentUser.lastName }}) are authorising images to be taken</p>

name: "irmerAuthoriser",
fieldset: {
legend: {
text: "Select an authoriser"

@dannychadburn dannychadburn Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
text: "Select an authoriser"
text: "Who is authorising that images can be taken for this appointment?"


{{ appModal({
id: "choose-authoriser-modal",
title: "Choose an authoriser",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: "Choose an authoriser",
title: "Nominate a mammographer",

const selected = modal.querySelector("input[name='irmerAuthoriser']:checked")
if (selected) {
document.querySelectorAll(".js-irmer-authorise-button").forEach((btn) => {
btn.textContent = "Authorise with " + selected.value + " and continue"

@dannychadburn dannychadburn Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
btn.textContent = "Authorise with " + selected.value + " and continue"
btn.textContent = "Complete all and continue"

legend: {
text: "Select an authoriser"
}
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
},
},
hint: {
text: "The person selected must be present while images are being taken"
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hint text below the question clarifying the role of the person being picked

btn.classList.add("js-complete-all-sections")
btn.classList.remove("js-choose-authoriser-link")
})
// Show the alternative authoriser links

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Show the alternative authoriser links
document.querySelectorAll(".js-authoriser-confirmation").forEach((p) => {
p.textContent = `By continuing, ${selected.value} is authorising images to be taken`;
});
// Show the alternative authoriser links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants