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 | Prescribing of short acting beta agonist (SABA) inhalers - salbutamol and terbutaline - compared with prescribing of inhaled corticosteroid inhalers and SABA inhalers |
---|---|
Why it matters | Why Asthma Still Kills reports that high use of short acting beta agonists (salbutamol and terbutaline) and poor adherence to inhaled corticosteroids in asthma suggests poor control - these patients should be reviewed regularly to ensure good control. The NHS England National Medicines Optimisation Opportunities for 2023/24 identify improving patient outcomes from the use of inhalers as an area for improvement. |
Tags | Standard, Respiratory, National medicines optimisation opportunities, Safety |
Implies cost savings | No |
Authored by | richard.croker |
Checked by | andrew.brown |
Last reviewed | 2024-08-06 |
Next review due | 2025-08-06 |
History | View change history on GitHub → |
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(quantity) AS numerator
FROM hscic.normalised_prescribing
WHERE bnf_code IN ("0301011R0AAAAAA", "0301011R0AAADAD", "0301011R0AAAFAF", "0301011R0AAAPAP", "0301011R0AAAQAQ", "0301011R0AABUBU", "0301011R0AABZBZ", "0301011R0AACBCB", "0301011R0AACCCC", "0301011R0BDAEAP", "0301011R0BEAHAQ", "0301011R0BEAIAP", "0301011R0BIAFAP", "0301011R0BIAGBU", "0301011R0BIAHAP", "0301011R0BKADAD", "0301011R0BLADAL", "0301011R0BMAAAP", "0301011R0BMABBU", "0301011R0BTAAAQ", "0301011R0BWAABZ", "0301011R0BWABAQ", "0301011R0BXAACB", "0301011R0BXABCC", "0301011R0BZAAAP", "0301011V0AABBBB", "0301011V0BBARBB")
GROUP BY month, practice_id
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(quantity) AS denominator
FROM hscic.normalised_prescribing
WHERE bnf_code IN ("0301011R0AAAAAA", "0301011R0AAADAD", "0301011R0AAAFAF", "0301011R0AAAPAP", "0301011R0AAAQAQ", "0301011R0AABUBU", "0301011R0AABZBZ", "0301011R0AACBCB", "0301011R0AACCCC", "0301011R0BDAEAP", "0301011R0BEAHAQ", "0301011R0BEAIAP", "0301011R0BIAFAP", "0301011R0BIAGBU", "0301011R0BIAHAP", "0301011R0BKADAD", "0301011R0BLADAL", "0301011R0BMAAAP", "0301011R0BMABBU", "0301011R0BTAAAQ", "0301011R0BWAABZ", "0301011R0BWABAQ", "0301011R0BXAACB", "0301011R0BXABCC", "0301011R0BZAAAP", "0301011V0AABBBB", "0301011V0BBARBB", "0302000C0AAAAAA", "0302000C0AAABAB", "0302000C0AAACAC", "0302000C0AAAKAK", "0302000C0AAARAR", "0302000C0AAASAS", "0302000C0AAATAT", "0302000C0AABEBE", "0302000C0AABFBF", "0302000C0AABGBG", "0302000C0AABHBH", "0302000C0AABJBJ", "0302000C0AABSBS", "0302000C0AABUBU", "0302000C0AABVBV", "0302000C0AABWBW", "0302000C0AABXBX", "0302000C0AABYBY", "0302000C0AABZBZ", "0302000C0AACACA", "0302000C0BBAAAC", "0302000C0BCAHAB", "0302000C0BCAIAA", "0302000C0BCAQAR", "0302000C0BEACAT", "0302000C0BFAAAA", "0302000C0BFABAB", "0302000C0BFACAC", "0302000C0BFAEAT", "0302000C0BFAFAU", "0302000C0BFAGAR", "0302000C0BHADAK", "0302000C0BHAEAJ", "0302000C0BHAFAQ", "0302000C0BIAEBJ", "0302000C0BJAABE", "0302000C0BJABBF", "0302000C0BJACBG", "0302000C0BJADBH", "0302000C0BJAEBG", "0302000C0BJAFBH", "0302000C0BLABBJ", "0302000C0BNAABU", "0302000C0BPAABE", "0302000C0BPABBF", "0302000C0BPACBV", "0302000C0BPADBW", "0302000C0BQAABX", "0302000C0BQABBZ", "0302000C0BRAABY", "0302000C0BRABCA", "0302000C0BSAABE", "0302000C0BSABBF", "0302000C0BTAABE", "0302000C0BTABBV", "0302000C0BTACBF", "0302000C0BTADBW", "0302000C0BUAABX", "0302000C0BUABBZ", "0302000C0BVAABF", "0302000C0BVABBV", "0302000C0BWAABX", "0302000C0BWABBZ", "0302000K0AAADAD", "0302000K0AAAGAG", "0302000K0AAAHAH", "0302000K0AAAKAK", "0302000K0AAALAL", "0302000K0AAAMAM", "0302000K0AAAUAU", "0302000K0AAAVAV", "0302000K0AAAWAW", "0302000K0AAAZAZ", "0302000K0AABABA", "0302000K0AABBBB", "0302000K0AABCBC", "0302000K0BBADAD", "0302000K0BBAHAG", "0302000K0BBAIAH", "0302000K0BBAKAK", "0302000K0BBAMAZ", "0302000K0BBANBA", "0302000K0BDAAAL", "0302000K0BDABAM", "0302000K0BDACAU", "0302000K0BDADBB", "0302000K0BDAEBC", "0302000K0BFAAAV", "0302000K0BFABAW", "0302000K0BGAAAK", "0302000K0BGABAG", "0302000K0BGACAH", "0302000K0BHAAAM", "0302000K0BHABAU", "0302000K0BIAAAU", "0302000K0BIABAM", "0302000K0BIADAL", "0302000K0BJAAAM", "0302000K0BJABAU", "0302000K0BKAAAM", "0302000K0BKABAU", "0302000N0AAARAR", "0302000N0AAASAS", "0302000N0AAATAT", "0302000N0AAAUAU", "0302000N0AAAXAX", "0302000N0AAAYAY", "0302000N0AAAZAZ", "0302000N0AABABA", "0302000N0AABCBC", "0302000N0AABEBE", "0302000N0AABFBF", "0302000N0AABGBG", "0302000N0AABHBH", "0302000N0AABJBJ", "0302000N0AABKBK", "0302000N0AABLBL", "0302000N0AABPBP", "0302000N0AABQBQ", "0302000N0AABRBR", "0302000N0AABSBS", "0302000N0BBARAR", "0302000N0BBASAS", "0302000N0BBATAT", "0302000N0BBAUAU", "0302000N0BBAYBA", "0302000N0BBBABC", "0302000N0BBBBBH", "0302000N0BCAAAX", "0302000N0BCABAY", "0302000N0BCACAZ", "0302000N0BCADBE", "0302000N0BCAEBF", "0302000N0BCAFBG", "0302000N0BDAABJ", "0302000N0BDABBK", "0302000N0BDACBL", "0302000N0BDADBP", "0302000N0BDAEBQ", "0302000N0BFAABF", "0302000N0BFABBG", "0302000N0BGAAAZ", "0302000N0BGABBF", "0302000N0BGACBG", "0302000N0BHAAAZ", "0302000N0BIAABF", "0302000N0BIABBG", "0302000N0BIACAY", "0302000N0BIADAZ", "0302000N0BJAABF", "0302000N0BJABBG", "0302000N0BKAAAY", "0302000N0BKABAZ", "0302000N0BLAABE", "0302000N0BLABBF", "0302000N0BLACBG", "0302000N0BMAAAZ", "0302000N0BNAAAZ", "0302000N0BNABAY", "0302000N0BNACAX", "0302000N0BPAABE", "0302000N0BPABBF", "0302000N0BPACBG", "0302000N0BQAABR", "0302000N0BQABBS", "0302000N0BRAAAX", "0302000N0BRABAY", "0302000N0BRACAZ", "0302000R0AAAAAA", "0302000R0AAACAC", "0302000R0BBAAAA", "0302000R0BBACAC", "0302000U0AAAAAA", "0302000U0AAABAB", "0302000U0BBAAAA", "0302000U0BBABAB", "0302000V0AAAAAA", "0302000V0AAABAB", "0302000V0BBAAAA", "0302000V0BBABAB", "0302000W0AAAAAA", "0302000W0BBAAAA", "0302000X0AAAAAA", "0302000X0AAABAB", "0302000X0AAACAC", "0302000X0BBAAAA", "0302000X0BBABAB", "0302000X0BBACAC", "0302000Y0AAAAAA", "0302000Y0BBAAAA", "0302000Z0AAAAAA", "0302000Z0BBAAAA")
GROUP BY month, practice_id