Antibiotic stewardship: volume of antibiotic prescribing (KTT9)

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 all antibacterial drugs (BNF 5.1) per oral antibacterials (BNF 5.1 sub-set) item-based STAR-PU.
Why it matters Antimicrobial resistance poses a significant threat to public health, especially because antimicrobials underpin routine medical practice. It is important that we don't overuse antibiotics. This measure shows how many are being prescribed locally.
Tags Antimicrobial Stewardship, Standard, Infections, NICE
Implies cost savings No
History View change history on GitHub →

Numerator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     SUM(items) AS numerator
 FROM hscic.normalised_prescribing
 WHERE bnf_code IN ("0501011J0AAABAB", "0501011J0AAAFAF", "0501011J0BBABAB", "0501011J0BBAFAF", "0501011P0AAADAD", "0501011P0AAAFAF", "0501011P0AAAJAJ", "0501011P0AAARAR", "0501011P0AAASAS", "0501012G0AAAAAA", "0501012G0AAABAB", "0501012G0AAACAC", "0501012G0AAADAD", "0501012G0AAAEAE", "0501012G0AAAFAF", "0501012G0AAAGAG", "0501012G0AAAPAP", "0501012G0AAAQAQ", "0501012G0AAARAR", "0501012G0BBABAB", "0501012H0AAAAAA", "0501012H0AAABAB", "0501012H0BBAAAA", "0501012H0BBABAB", "0501012U0AAABAB", "0501013B0AAAAAA", "0501013B0AAABAB", "0501013B0AAAHAH", "0501013B0AAAIAI", "0501013B0AAAJAJ", "0501013B0AAAKAK", "0501013B0AAASAS", "0501013B0AAATAT", "0501013B0AAAUAU", "0501013B0AAAVAV", "0501013B0BCAAAA", "0501013B0BCABAB", "0501013B0BCAEAS", "0501013B0BCAFAT", "0501013B0BCAGAI", "0501013B0BCAIAH", "0501013C0AAACAC", "0501013C0AAADAD", "0501013C0AAAEAE", "0501013C0BCABAD", "0501013C0BCACAE", "0501013E0AAAAAA", "0501013E0AAABAB", "0501013E0AAADAD", "0501013E0AAAEAE", "0501013E0AAAFAF", "0501013E0BEAAAA", "0501013E0BEABAB", "0501013K0AAAAAA", "0501013K0AAABAB", "0501013K0AAADAD", "0501013K0AAAEAE", "0501013K0AAAFAF", "0501013K0AAAGAG", "0501013K0AAAHAH", "0501013K0AAAIAI", "0501013K0AAAJAJ", "0501013K0AAAKAK", "0501013K0AAANAN", "0501013K0BBAAAA", "0501013K0BBACAE", "0501013K0BBAHAF", "0501013K0BBAJAD", "0501013K0BBAKAG", "0501013K0BBALAJ", "0501013K0BBAMAK", "0501013L0AAAAAA", "0501013L0AAADAD", "0501014N0BBACAC", "0501014S0AAAAAA", "0501014S0AAABAB", "0501014S0AAACAC", "0501014S0BBAAAA", "0501014S0BBABAB", "0501014S0BBACAC", "0501015P0AAABAB", "0501015P0AAACAC", "0501015P0BBABAB", "0501021A0AAAAAA", "0501021A0AAABAB", "0501021A0AAACAC", "0501021A0AAAEAE", "0501021A0AAAGAG", "0501021A0AAAJAJ", "0501021A0AAAKAK", "0501021A0BBABAB", "0501021A0BBACAC", "0501021A0BBADAE", "0501021A0BBAEAG", "0501021A0BDAAAA", "0501021B0AAAAAA", "0501021B0AAACAC", "0501021C0AAAAAA", "0501021C0AAACAC", "0501021C0BBAAAA", "0501021D0AAAAAA", "0501021D0AAABAB", "0501021D0AAACAC", "0501021G0AAABAB", "0501021G0AAACAC", "0501021G0AAADAD", "0501021G0BBAAAB", "0501021G0BBABAC", "0501021G0BBACAD", "0501021H0AAAAAA", "0501021H0AAABAB", "0501021H0AAACAC", "0501021H0AAAHAH", "0501021H0BBABAA", "0501021H0BBACAB", "0501021H0BBAGAH", "0501021J0AAAAAA", "0501021J0AAABAB", "0501021J0AAACAC", "0501021J0BBAAAA", "0501021J0BBABAB", "0501021K0AAAAAA", "0501021K0AAABAB", "0501021K0AAACAC", "0501021K0BBAAAA", "0501021K0BBABAB", "0501021K0BBACAC", "0501021L0AAAAAA", "0501021L0AAABAB", "0501021L0AAACAC", "0501021L0AAADAD", "0501021L0AAAEAE", "0501021L0AAAGAG", "0501021L0AAAHAH", "0501021L0AAANAN", "0501021L0AAAPAP", "0501021L0BBAJAE", "0501021L0BCAAAA", "0501021L0BCABAB", "0501021L0BCACAG", "0501021L0BCADAH", "0501021L0BCAEAC", "0501021L0BCAFAD", "0501021M0AAAAAA", "0501021M0AAABAB", "0501021M0BCAAAA", "0501021M0BCABAB", "0501022A0AAAAAA", "0501022A0AAABAB", "0501022A0BBAAAA", "0501022A0BBABAB", "0501022B0AAAAAA", "0501022B0BBAAAA", "0501022D0BBABAA", "0501023A0AAABAB", "0501023A0AAAFAF", "0501023A0BCAAAF", "0501030F0AAAAAA", "0501030F0AAAFAF", "0501030F0AAAGAG", "0501030F0AAAIAI", "0501030I0AAAAAA", "0501030I0AAABAB", "0501030I0AAAHAH", "0501030I0AAAKAK", "0501030I0AAALAL", "0501030I0BCAAAB", "0501030I0BCABAA", "0501030I0BEABAB", "0501030L0AAABAB", "0501030L0BBABAB", "0501030P0AAAAAA", "0501030P0AAABAB", "0501030P0AAACAC", "0501030P0AAADAD", "0501030P0AAAEAE", "0501030P0BBACAC", "0501030P0BDAAAD", "0501030P0BDABAE", "0501030P0BHAAAC", "0501030P0BHABAC", "0501030T0AAAJAJ", "0501030T0AAAPAP", "0501030T0BIAAAJ", "0501030V0AAAAAA", "0501030V0AAAFAF", "0501030V0AAARAR", "0501030Y0AAAAAA", "0501030Z0AAAAAA", "0501030Z0AAABAB", "0501030Z0BBAAAA", "0501030Z0BCAAAB", "0501040C0AAAAAA", "0501040C0AAADAD", "0501040H0AAAAAA", "0501040H0AAAEAE", "0501040H0AAAHAH", "0501040H0AAAMAM", "0501040H0AAAQAQ", "0501040H0AAAWAW", "0501040H0AAAYAY", "0501040H0AABBBB", "0501040H0AABCBC", "0501040H0AABFBF", "0501040H0BBAAAA", "0501040H0BBAFAM", "0501040H0BCAAAA", "0501040H0BGAAAE", "0501040N0AAADAD", "0501040N0AAAJAJ", "0501040U0AAABAB", "0501040U0AAACAC", "0501040U0AAAGAG", "0501040U0AAAHAH", "0501040U0AAAIAI", "0501040U0AAAKAK", "0501040U0AAALAL", "0501040U0AAANAN", "0501040U0BBACAC", "0501040U0BCAAAG", "0501040U0BCABAL", "0501040U0BDAAAK", "0501040U0BFAAAG", "0501050A0AAAAAA", "0501050A0AAABAB", "0501050A0AAADAD", "0501050A0AAAGAG", "0501050A0AAAHAH", "0501050A0BBAAAA", "0501050A0BBABAB", "0501050A0BBADAD", "0501050B0AAAAAA", "0501050B0AAABAB", "0501050B0AAACAC", "0501050B0AAADAD", "0501050B0AAAEAE", "0501050B0AAAFAF", "0501050B0AAAHAH", "0501050B0BBAAAA", "0501050B0BBABAB", "0501050B0BBACAC", "0501050B0BBADAD", "0501050B0BBAEAE", "0501050B0BBAFAF", "0501050B0BBAHAH", "0501050B0BEAAAE", "0501050B0BHAAAE", "0501050C0AAABAB", "0501050C0AAAKAK", "0501050C0BCAAAK", "0501050C0BKAAAK", "0501050C0BLAAAK", "0501050H0AAAAAA", "0501050H0AAABAB", "0501050H0AAACAC", "0501050H0AAAEAE", "0501050H0AAALAL", "0501050H0AAAMAM", "0501050H0AAANAN", "0501050H0BDAIAE", "0501050H0BDAMAM", "0501050H0BDANAL", "0501050H0BDAPAN", "0501050K0AAAAAA", "0501050N0AAAAAA", "0501050N0AAABAB", "0501050N0BBAAAA", "0501050N0BBABAB", "0501050N0BCAAAA", "0501050N0BCABAB", "0501060D0AAAAAA", "0501060D0AAABAB", "0501060D0AAAEAE", "0501060D0AAAGAG", "0501060D0AAAHAH", "0501060D0AAAIAI", "0501060D0AAAMAM", "0501060D0AAANAN", "0501060D0AAAPAP", "0501060D0AAAQAQ", "0501060D0AAARAR", "0501060D0AAASAS", "0501060D0AAATAT", "0501060D0BBAAAA", "0501060D0BBABAB", "0501060E0AAAAAA", "0501060E0AAABAB", "0501060E0BBAAAA", "0501070ABAAAAAA", "0501070ABAAABAB", "0501070ACAAAAAA", "0501070ACAAABAB", "0501070ACBBAAAA", "0501070AEAAADAD", "0501070AEBBADAD", "0501070AEBCAAAD", "0501070AEBDAAAD", "0501070F0AAAAAA", "0501070F0AAACAC", "0501070H0AAAEAE", "0501070H0BBAAAE", "0501070I0AAABAB", "0501070I0AAADAD", "0501070I0AAAEAE", "0501070I0AAAGAG", "0501070I0AAAHAH", "0501070I0BBABAB", "0501070I0BBACAE", "0501070I0BCAAAD", "0501070I0BCABAB", "0501070I0BDAAAG", "0501070I0BEAAAD", "0501070I0BEABAH", "0501070M0AAAAAA", "0501070M0BBAAAA", "0501070N0AAADAD", "0501070N0BBAAAD", "0501070T0AAAAAA", "0501070T0AAABAB", "0501070T0BBAAAA", "0501070T0BBABAB", "0501070U0AAAAAA", "0501070U0AAABAB", "0501070U0AAACAC", "0501070U0AAAFAF", "0501070U0AAAHAH", "0501070U0AAAKAK", "0501070U0AAALAL", "0501070U0BBAAAA", "0501070U0BBADAC", "0501070U0BBAEAF", "0501070W0AAAAAA", "0501070W0AAABAB", "0501070W0BBAAAA", "0501070W0BBACAB", "0501070X0AAAAAA", "0501070X0AAABAB", "0501070X0AAACAC", "0501070X0BCAAAA", "0501070X0BEAAAB", "0501070Y0AAAAAA", "0501070Y0AAABAB", "0501070Y0BBAAAA", "0501070Z0AAAAAA", "0501080D0AAABAB", "0501080D0AAACAC", "0501080D0AAAEAE", "0501080D0AAAHAH", "0501080D0AAAJAJ", "0501080D0BGAAAH", "0501080D0BGACAJ", "0501080D0BGAEAE", "0501080D0BGAFAC", "0501080J0AAABAB", "0501080J0AAAHAH", "0501080T0AAAAAA", "0501080V0AAADAD", "0501080V0BDABAD", "0501080W0AAADAD", "0501080W0AAAEAE", "0501080W0AAAIAI", "0501080W0AAAMAM", "0501080W0AAANAN", "0501080W0BCACAI", "0501080W0BGABAE", "0501080W0BHAAAD", "0501080W0BHABAE", "0501090A0AAAAAA", "0501090A0BCAAAA", "0501090E0AAABAB", "0501090H0AAABAB", "0501090H0AAACAC", "0501090H0AAARAR", "0501090H0AAASAS", "0501090H0AAAZAZ", "0501090H0AABDBD", "0501090H0AABHBH", "0501090K0AAAHAH", "0501090K0AAAIAI", "0501090K0AABIBI", "0501090K0AABJBJ", "0501090K0AABMBM", "0501090K0AACJCJ", "0501090K0AACUCU", "0501090N0AAA9A9", "0501090N0AABBBB", "0501090N0AABIBI", "0501090N0AABJBJ", "0501090N0AABKBK", "0501090N0AABPBP", "0501090N0AACJCJ", "0501090N0BBABCJ", "0501090Q0AAABAB", "0501090Q0AAAZAZ", "0501090Q0BBAAAB", "0501090R0AAAAAA", "0501090R0AAABAB", "0501090R0AAADAD", "0501090R0AAAFAF", "0501090R0BBAAAA", "0501090R0BBABAB", "0501090R0BBACAF", "0501090R0BCABAB", "0501090S0AAAAAA", "0501090S0AAABAB", "0501090S0AAACAC", "0501090S0BBAAAA", "0501090S0BBABAB", "0501090S0BDAAAC", "0501090S0BEAAA0", "0501100C0AAAAAA", "0501100H0AAAFAF", "0501100H0AAAHAH", "0501100H0AAALAL", "0501100J0BCAAAJ", "0501110C0AAAEAE", "0501110C0AAAGAG", "0501110C0AAAHAH", "0501110C0AAAIAI", "0501110C0AAAJAJ", "0501110C0AAAKAK", "0501110C0AABABA", "0501110C0AABHBH", "0501110C0AABJBJ", "0501110C0AABLBL", "0501110C0AABQBQ", "0501110C0AABTBT", "0501110C0BCAAAI", "0501110C0BCABAJ", "0501110C0BCADAG", "0501110C0BCAEAH", "0501110C0BCAIAE", "0501110G0AAABAB", "0501110G0BBAAAB", "0501120L0AAAAAA", "0501120L0AAABAB", "0501120L0AAADAD", "0501120L0AAAFAF", "0501120L0AAAGAG", "0501120L0AAAJAJ", "0501120L0AAAQAQ", "0501120L0AAAUAU", "0501120L0AABEBE", "0501120L0AABFBF", "0501120L0AABGBG", "0501120L0AABQBQ", "0501120L0BBAAAA", "0501120L0BBABAF", "0501120L0BBADAJ", "0501120L0BBAJBG", "0501120N0AAAAAA", "0501120P0AAAAAA", "0501120P0AAABAB", "0501120P0BBAAAA", "0501120P0BBACAB", "0501120Q0AAAAAA", "0501120Q0BBAAAA", "0501120X0AAAAAA", "0501120X0AAABAB", "0501120X0AAACAC", "0501120X0AAADAD", "0501120X0AAAFAF", "0501120Y0AAAAAA", "0501120Y0BBAAAA", "0501130H0AAAAAA", "0501130H0BBAAAA", "0501130R0AAAAAA", "0501130R0AAABAB", "0501130R0AAACAC", "0501130R0AAADAD", "0501130R0AAAEAE", "0501130R0AAAGAG", "0501130R0AAAJAJ", "0501130R0AAAMAM", "0501130R0AAANAN", "0501130R0AAARAR", "0501130R0AAATAT", "0501130R0AAAUAU", "0501130R0AAAVAV", "0501130R0AABDBD", "0501130R0AABEBE", "0501130R0AABSBS", "0501130R0BBAAAD", "0501130R0BBABAE", "0501130R0BBACAC", "0501130R0BCAAAA", "0501130R0BCABAB", "0501130R0BGAAAG", "0501130R0BHAAAE", "0501130R0BHABAD", "0501130S0AAAAAA", "0501130S0BBAAAA")
 GROUP BY month, practice_id

Denominator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     CAST(JSON_EXTRACT(MAX(star_pu), '$.oral_antibacterials_item') AS FLOAT64) AS denominator
 FROM hscic.practice_statistics
 GROUP BY month, practice_id