nhsuk / nhsuk-service-manual-community-backlog

This is a place for digital teams in the NHS to work together and develop the NHS digital service manual.
https://service-manual.nhs.uk/community-and-contribution
62 stars 5 forks source link

Print this page #240

Open henocookie opened 4 years ago

henocookie commented 4 years ago

What

A component that would allow a user to print a page.

Why

This would allow users to print out information from a webpage such as symptoms of a condition or medication details to share with someone who doesn't have a computer or internet access.

This has been mentioned previously in a slack message and I have heard comments from a few people in NHS Digital that certain information, such as data collection submission timetables, are often printed out by GPs and trusts for all staff to see.

Users currently have to rely on accessible PDFs of printable content or the default print dialogue offered by their browsers which often includes unneeded content such as URLs, time accessed and navigation elements.

Anything else

sarawilcox commented 4 years ago

@bencullimore may have some background on this.

bencullimore commented 4 years ago

For the general public: Did a bit of work on 'print this page' links/components back in beta on medicines information. We included a 'print this page' link on all medicines pages - they had fairly decent viewing figures, thousands a day.

We found a very low percentage of our traffic used the buttons (sorry, don't have exact figures to hand - it was a few years ago). We explored the functionality during user testing and responses were mostly "how can I print from a phone?" - pretty much in line with usage stats for mobile devices on NHS.UK, I think meds are currently at 80% mobile.

We also had an issue with the sheer amount of information - if you were to print a page on meds, on average you're looking at 12 A4 pieces of paper. How can you alert users to this from a simple button.

NHS Choices also had a print icon on every page which wasn't widely used.

Based on this information, medicines decided to remove the function from the pages (remove cognitive load, precious space) and just have simple css so when someone prints from the browser (file > print) - meaning that if someone was to print it is formatted for paper, all expanders are expanded etc.

We'd noted a few times in testing (meds pages) users suggesting that they'd take a screenshot on their phones and share via messaging services, such as WhatsApp/ Facebook messenger etc.

For health professionals: We found through anecdotal evidence that health professionals like to print pages of health information during consultations. A discovery piece was kicked off in 2018? to gather needs from health professionals around this.

From memory, I think the number of printed pages was an issue and GPs having a preference for more technical information from other websites (not NHS.UK).

karlgoldstraw commented 4 years ago

I'd like to add a couple of tidbits as well:

During migration a couple of years ago, there was evidence floating around that clinicians liked to print the 'Guides' sections for patients in one click, and were frustrated by the removal of this functionality as it meant they then had to print off pages individually.

Currently, there's a dormant ticket in mission team 2 for print functionality and improvements to the CSS. There were some CSS amends made very recently, which can be found on confluence which include the ability to print out some pages in black and white alone, and converting colours to patterns and/or symbols for a suitable output similar to that seen by someone suffering from monochromacy. As a team we documented various layout variation bugs when printing from different devices and browsers.

But user needs for printing are not clearly understood. Some research has been done in various teams but we do not yet have a clear picture on which to base a site-wide approach.

User needs that have been hypothesised, based on varying levels of evidence include:

There is a need to compile evidence from existing research and probably to supplement this with some targeted research, espeically for that around printing from mobile devices.

devansXD commented 4 years ago

We have a version of this on cervical screening: cervical-screening herokuapp com_v7_patient_hmr101_preview(Laptop with MDPI screen) (3)

So far this has tested well,with clinical users, and the version we use pre-populates from data already stored, or alternatively, data entered as part of a separate flow

ghost commented 4 years ago

We've recently added this functionality into our Good Practice Guidance website that we're working on with NHSx.

The site provides guidance and resources for GPs. As it's possible for users to have weak internet connections, we added this functionality so that they would be able to keep the guidance with them without having to be online.

We implemented it as simply as possible by setting a buttons href to javascript:window.print(); (as seen below;

{{ button({
    text: "Print this page",
    href: "javascript:window.print();",
    classes: "nhsuk-u-margin-bottom-0"
}) }}

However, once we added in an adequate CSP this functionality stopped working and we had to change it to the following;

{{ button({
    text: "Print this page",
    classes: "nhsuk-u-margin-bottom-0",
    attributes: {
        id: "article-print"
    }
}) }}

and in the main.js file:

document.addEventListener( "DOMContentLoaded", () => {
    document.querySelector( "#article-print" ).addEventListener( "click", articlePrint )

    function articlePrint() {
        window.print()
    }
} )

You can take a look at it in action here: https://www.covid19-gpg.innovationlab.org.uk/topics/c19-vulnerability-coding/identifying-shielded-patients (we're currently waiting on a domain so we have it on a temporary one for now)

Hope this helps!