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 | Number of prescription items for long-acting human analogue insulins as a percentage of the total number of prescription items for all long-acting and intermediate acting insulins excluding biphasic insulins. |
---|---|
Why it matters | NICE recommend that for patients with type 2 diabetes requiring insulin, 'neutral protamine Hagedorn' (NPH) insulin is the preferred starting therapy with insulin, and that the more expensive long-acting insulin analogues (detemir and insulin glargine) can be considered as an alternative in certain circumstances. |
Tags | Standard, Cost Saving, Diabetes, NICE |
Implies cost savings | No |
History | View change history on GitHub → |
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(items) AS numerator
FROM hscic.normalised_prescribing
WHERE bnf_code IN ("0601012V0AAAAAA", "0601012V0AAABAB", "0601012V0AAADAD", "0601012V0AAAEAE", "0601012V0AAAFAF", "0601012V0BBAAAA", "0601012V0BBABAB", "0601012V0BBACAD", "0601012V0BBAEAD", "0601012V0BCAAAE", "0601012V0BCABAF", "0601012V0BDABAA", "0601012V0BDACAD", "0601012V0BDADAD", "0601012V0BEAAAD", "0601012X0AAAAAA", "0601012X0AAABAB", "0601012X0BBAAAA", "0601012X0BBABAB", "0601012X0BBACAB", "0601012Z0AAAAAA", "0601012Z0AAABAB", "0601012Z0AAACAC", "0601012Z0BBAAAA", "0601012Z0BBABAB", "0601012Z0BBACAC")
GROUP BY month, practice_id
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(items) AS denominator
FROM hscic.normalised_prescribing
WHERE bnf_code IN ("0601012G0BCAAAH", "0601012S0AAABAB", "0601012S0AAADAD", "0601012S0AAAEAE", "0601012S0AAAIAI", "0601012S0AAALAL", "0601012S0AAAMAM", "0601012S0AAAQAQ", "0601012S0AAATAT", "0601012S0BCAAAD", "0601012S0BCAEAB", "0601012S0BCAGAS", "0601012S0BCAHAT", "0601012S0BDAJAE", "0601012S0BDAKAM", "0601012S0BDALAL", "0601012S0BDAMAI", "0601012S0BDANAI", "0601012S0BGAAAE", "0601012S0BGADAL", "0601012S0BGAEAI", "0601012S0BGAFAI", "0601012S0BIAAAQ", "0601012S0BIABAL", "0601012S0BIACAI", "0601012S0BIADAI", "0601012U0AAAAAA", "0601012U0BBAAAA", "0601012V0AAAAAA", "0601012V0AAABAB", "0601012V0AAADAD", "0601012V0AAAEAE", "0601012V0AAAFAF", "0601012V0BBAAAA", "0601012V0BBABAB", "0601012V0BBACAD", "0601012V0BBAEAD", "0601012V0BCAAAE", "0601012V0BCABAF", "0601012V0BDABAA", "0601012V0BDACAD", "0601012V0BDADAD", "0601012V0BEAAAD", "0601012X0AAAAAA", "0601012X0AAABAB", "0601012X0BBAAAA", "0601012X0BBABAB", "0601012X0BBACAB", "0601012Z0AAAAAA", "0601012Z0AAABAB", "0601012Z0AAACAC", "0601012Z0BBAAAA", "0601012Z0BBABAB", "0601012Z0BBACAC")
GROUP BY month, practice_id