Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measures not displaying correctly from email alert #5082

Open
richiecroker opened this issue Dec 2, 2024 · 9 comments · Fixed by #5085
Open

Measures not displaying correctly from email alert #5082

richiecroker opened this issue Dec 2, 2024 · 9 comments · Fixed by #5085
Labels

Comments

@richiecroker
Copy link
Collaborator

We've had an email from a user:

Hi
Just some feedback re your excellent monthly updates.
Best-case possible savings
We compared this practice's spending with the best-performing 10% on all the areas we track. If it prescribed as well as those practices, it could save around £10,000. Here's a list of measures, sorted by potential cost savings.

I might be wrong, but am wondering if the list of measures, sorted by potential cost savings is correct? When clicking on it, it seems to show measures that the practice is good on? Have found the same on the monthly updates for other practices
Thanks

On checking, this does seem the case, and it's only showing 5 measures. If you change the practice in the URL, the same 5 measures show up (https://openprescribing.net/practice/L83106/measures/?utm_medium=email&utm_campaign=monthly+alert+2024-11-27&utm_source=dashboard-alerts&utm_content=%2Femail%2Fmonthly+alert+2024-11-27%2Fdashboard-alerts%2F11245&sortBySavings=1).

If you click on "potential for improvement", it corrects itself.

@richiecroker richiecroker changed the title Monthly emails link not displaying measures correctly Measures not displaying correct when "potential savings" sort button selected Dec 2, 2024
@richiecroker
Copy link
Collaborator Author

EDIT: it turns out it's not just from the email alert - it's happening even without, until you ctrl-F5

@richiecroker richiecroker changed the title Measures not displaying correct when "potential savings" sort button selected Measures not displaying correctly from email alert Dec 2, 2024
@evansd
Copy link
Collaborator

evansd commented Dec 4, 2024

Just to confirm @richiecroker, for that specific practice is this what the link should be:
https://openprescribing.net/practice/K83043/measures/?tags=cost&sortBySavings=1

i.e. linking specifically the measures tagged "cost saving"?

evansd added a commit that referenced this issue Dec 4, 2024
Previously the link to you to a page showing "core" measures which
didn't always include the relevant measures.

Closes #5082
evansd added a commit that referenced this issue Dec 4, 2024
Previously the link to you to a page showing "core" measures which
didn't always include the relevant measures.

Closes #5082
@richiecroker
Copy link
Collaborator Author

@evansd it's basically mimicking this;
Image

And that doesn't seem to work properly

@evansd
Copy link
Collaborator

evansd commented Dec 4, 2024

Interesting. I can't replicate that behaviour.

For instance, when I open this link:
https://openprescribing.net/practice/K83043/measures/?tags=core&sortBySavings=1

I get the same measures in the same order as if I open this link and then click the "Potential savings" button:
https://openprescribing.net/practice/K83043/measures/?tags=core

That also doesn't quite tie in with what the original email was saying:

When clicking on it, it seems to show measures that the practice is good on?

Which sounds more like the wrong measures being shown, rather than the right measures in the wrong order.

It's quite possible there are two bugs here. But linking to the right set of measures seems like the most important one to fix.

@evansd
Copy link
Collaborator

evansd commented Dec 4, 2024

I'm reopening this because it's not yet clear whether there's more than one bug here and although I'm confident the linked PR is an improvement there may be more work we need to do.

@evansd evansd reopened this Dec 4, 2024
@richiecroker
Copy link
Collaborator Author

@evansd i'm just looking at this, and still getting the same issue. I have tried in both Edge and Chrome.

In summary:

If I click on https://openprescribing.net/practice/K83043/measures/?tags=core&sortBySavings=1

I get the same 4 measures:

Image

If I click on "Potential for improvement" it corrects itself:

Image

If I click on "Potential savings" it returns to the 4

And the 4 always seem to be:

Toothpaste
Glutenfree
Erectile Dysfunction
Bile Acid Sequestrants

@richiecroker
Copy link
Collaborator Author

I've just tried at regional level, and get the same thing (with the addition of probiotics)

Image

@evansd
Copy link
Collaborator

evansd commented Dec 10, 2024

I think this is basically working as intended Rich. Of all the measures on that page (which are just the "core" measures), those four are the only ones with a cost-saving value.

If you look at the measures tagged as cost saving you get a more sensible list:
https://openprescribing.net/practice/K83043/measures/?tags=cost&sortBySavings=1

I've updated the link in the email to point to the cost saving measures, which is presumably what it should have done all along.

There is one bit of behaviour though which is arguably a bug, or arguably not, depending on the intentions of whoever built this. Switching to "Potential savings" filters out any measures without savings, but it keeps measures with negative cost savings (i.e. where the practice is doing better than the median). It would be easy to filter those out to and then the page would display a warning like this:
Image

I think that's probably less confusing overall, although it does mean that you can't sort measures to show how well you're saving money.

@mikerkelly
Copy link

Removing tech-support label as I don't think we need actively follow this up or urgently get back further to Rich (the tech-support process uses this label for tracking such tickets). I leave it to Team RAP if there's anything further to do with this ticket now it's on their radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants