ebmdatalab / openprescribing

A Django app providing a REST API and dashboards for the HSCIC's GP prescribing data
https://openprescribing.net
MIT License
97 stars 26 forks source link

Bug on positive messages for cost savings for cost-related measures #1687

Closed brianmackenna closed 5 years ago

brianmackenna commented 5 years ago

Following on from #1684.

There seems to be a bug on practice pages in calculating "positive" messages. For example in Islington Cental the prescribe no co proxamol (link to measure) so it should have a postive message like By prescribing better than the median, this prctice has saved the NHS £xxxx over the past 6 months

It seems to work ok on CCG pages see liothyronine here and regions here

inglesp commented 5 years ago

This affects measures where the median practice (or CCG, in the case of lphomeopathy) has zero prescribing.

We can change

If it had prescribed in line with the median, this practice would have spent £0 less over the past 6 months

to

By prescribing better than the median, this practice has saved the NHS £0 over the past 6 months

which is slightly more positive!

brianmackenna commented 5 years ago

I don't think it make sense to majority of our users. Should we not have something like

By prescribing better than the median, this practice has saved the NHS £0 over the past 6 months. Your prescribing is in line with most practices and you have all reduced your prescribing to £0 so therefore we don't assign a positive sum

I'm not fully happy with that wording so please feel free to tweak.

If this is fiddly and requires messing with frontend code can I suggest we do the pull request as is and make a new issue? We can then review with #986 when we get to it, when we get user feedback or when we decide it hits top three

inglesp commented 5 years ago

How about:

Over the last six months this practice spent £0, which is in line with the median practice. No further improvement is possible!

brianmackenna commented 5 years ago

Perfect!