Below are the database queries which are used to create this measure. These are run against a copy of the BSA prescribing data which we store in Google BigQuery. We're working on making our BigQuery tables publicly available at which point it will be possible to run and modify these queries yourself. But even where code and database queries are not directly useable by others we believe it is always preferable to make them public.
Description | Total cost of prescriptions for bile acid sequestrants, fibrates, nicotinic acid, and omega-3 fatty acid compounds per 1000 registered patients |
---|---|
Why it matters | NICE guidance suggests that, for the vast majority of people who need treatment for high cholesterol, these drugs should not be used. There is no evidence that omega 3 fatty acids reduce the chances of patients getting cardiovascular disease. |
Tags | Cardiovascular system, Standard, Efficacy, NICE |
Implies cost savings | Yes |
History | View change history on GitHub → |
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(actual_cost) AS numerator
FROM hscic.normalised_prescribing
WHERE bnf_code IN ("021200010AAAAAA", "021200010BBAAAA", "0212000A0AAAAAA", "0212000A0BBAAAA", "0212000ABAAAAAA", "0212000ABBBAAAA", "0212000ABBCAAAA", "0212000ABBDAAAA", "0212000ABBEAAAA", "0212000ABBFAAAA", "0212000ABBGAAAA", "0212000ABBHAAAA", "0212000ABBIAAAA", "0212000ABBJAAAA", "0212000ADAAAAAA", "0212000ADBBAAAA", "0212000D0AAAAAA", "0212000D0AAABAB", "0212000D0AAACAC", "0212000D0BBAAAA", "0212000D0BBABAB", "0212000D0BFAAAB", "0212000F0AAABAB", "0212000F0AAAEAE", "0212000F0BBAAAB", "0212000F0BBACAE", "0212000K0AAAAAA", "0212000K0AAACAC", "0212000K0BBAAAA", "0212000K0BBABAA", "0212000K0BBACAC", "0212000P0AAABAB", "0212000P0AAACAC", "0212000P0AAADAD", "0212000P0AAAEAE", "0212000P0AAAFAF", "0212000P0BBABAB", "0212000P0BBACAC", "0212000P0BBADAD", "0212000P0BCAAAE", "0212000P0BDAAAF", "0212000Q0AAAAAA", "0212000Q0AAABAB", "0212000Q0BBAAAA", "0212000Q0BBABAB", "0212000U0AAABAB", "0212000U0AAAVAV", "0212000V0AAABAB", "0212000V0BBABAB")
GROUP BY month, practice_id
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(total_list_size / 1000.0) AS denominator
FROM hscic.practice_statistics
GROUP BY month, practice_id