Ciclosporin and tacrolimus oral preparations prescribed generically

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 items of generic ciclosporin and tacrolimus preparations as a proportion of total items of all ciclosporin and tacrolimus items
Why it matters It is recommended for both ciclosporin and tacrolimus that patients are prescribed and dispensed by brand name, to reduce the problems of patients switching formulations. You can read more in our detailed paper on unsafe prescribing of tacrolimus and ciclosporin.
Tags Standard, Generic prescribing, Safety
Implies cost savings No
Authored by richard.croker
Checked by andrew.brown
Last reviewed 2024-02-12
Next review due 2026-02-12
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 ("0802020G0AAAAAA", "0802020G0AAACAC", "0802020G0AAADAD", "0802020G0AAAEAE", "0802020G0AAAFAF", "0802020G0AAAGAG", "0802020G0AAAHAH", "0802020T0AAAAAA", "0802020T0AAABAB", "0802020T0AAAFAF", "0802020T0AAAGAG", "0802020T0AAALAL", "0802020T0AAAMAM", "0802020T0AAANAN", "0802020T0AAAPAP", "0802020T0AAATAT", "0802020T0AAAVAV", "0802020T0AAAWAW", "0802020T0AABCBC", "0802020T0AABDBD", "0802020T0AABEBE", "0802020T0AABFBF", "0802020T0AABGBG", "0802020T0AABJBJ")
 GROUP BY month, practice_id

Denominator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     SUM(items) AS denominator
 FROM hscic.normalised_prescribing
 WHERE bnf_code IN ("0802020G0AAAAAA", "0802020G0AAACAC", "0802020G0AAADAD", "0802020G0AAAEAE", "0802020G0AAAFAF", "0802020G0AAAGAG", "0802020G0AAAHAH", "0802020G0BBAAAG", "0802020G0BBACAA", "0802020G0BBADAC", "0802020G0BBAEAD", "0802020G0BBAFAF", "0802020G0BCAAAG", "0802020G0BCABAC", "0802020G0BCACAF", "0802020G0BCADAD", "0802020G0BCAEAH", "0802020G0BEAAAC", "0802020G0BEABAF", "0802020G0BEACAD", "0802020G0BFAAAC", "0802020G0BFABAF", "0802020G0BFACAD", "0802020G0BGAAAD", "0802020G0BGABAF", "0802020G0BGACAC", "0802020G0BGADAG", "0802020G0BHAAAC", "0802020G0BHABAF", "0802020G0BHACAD", "0802020G0BHADAH", "0802020T0AAAAAA", "0802020T0AAABAB", "0802020T0AAAFAF", "0802020T0AAAGAG", "0802020T0AAALAL", "0802020T0AAAMAM", "0802020T0AAANAN", "0802020T0AAAPAP", "0802020T0AAATAT", "0802020T0AAAVAV", "0802020T0AAAWAW", "0802020T0AABCBC", "0802020T0AABDBD", "0802020T0AABEBE", "0802020T0AABFBF", "0802020T0AABGBG", "0802020T0AABJBJ", "0802020T0BBAAAA", "0802020T0BBABAB", "0802020T0BBACAC", "0802020T0BBADAF", "0802020T0BCAAAM", "0802020T0BCABAN", "0802020T0BCACAP", "0802020T0BCADAT", "0802020T0BDAAAV", "0802020T0BDABAW", "0802020T0BEAAAB", "0802020T0BEABAA", "0802020T0BEACAF", "0802020T0BEADBF", "0802020T0BEAEBG", "0802020T0BGAAAF", "0802020T0BGABAB", "0802020T0BJAABC", "0802020T0BJABBD", "0802020T0BJACBE", "0802020T0BKAAAM", "0802020T0BKABAN", "0802020T0BKACAT", "0802020T0BKADAP", "0802020T0BKAEBJ")
 GROUP BY month, practice_id
Feedback