Measures not displaying correctly from email alert
Opened this issue · 8 comments
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.
EDIT: it turns out it's not just from the email alert - it's happening even without, until you ctrl-F5
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 it's basically mimicking this;
And that doesn't seem to work properly
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.
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 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:
If I click on "Potential for improvement" it corrects itself:
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
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:
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.