Glaucoma eye drops prescribed by brand

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 branded formulations of eye drops to treat glaucoma as a percentage of prescribing of all eye drops to treat glaucoma
Why it matters There are a number of generic preparations available to treat glaucoma. Generic preparations are generally cheaper than the branded equivalents.
Tags Standard, Cost Saving, Eye, Generic prescribing
Implies cost savings No
History View change history on GitHub →

Numerator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     SUM(quantity) AS numerator
 FROM hscic.normalised_prescribing
 WHERE bnf_code IN ("1106000AABBAAAA", "1106000AABCAAAA", "1106000ABBBAAAA", "1106000ABBBABAB", "1106000ABBBACAC", "1106000ABBDAAAC", "1106000ABBEAAAC", "1106000ACBBAAAA", "1106000ADBBAAAA", "1106000ADBCAAAA", "1106000ADBDAAAB", "1106000AEBBAAAA", "1106000AEBCAAAA", "1106000AEBDAAAB", "1106000AFBBAAAA", "1106000AFBBABAB", "1106000AFBBACAC", "1106000AFBCAAAA", "1106000AFBDAAAD", "1106000AFBEAAAD", "1106000AFBFAAAD", "1106000AGBBAAAA", "1106000AHBBAAAA", "1106000AIBBAAAA", "1106000AIBBABAB", "1106000AIBCABAC", "1106000AJBBAAAA", "1106000AKBBAAAA", "1106000AKBBABAB", "1106000ALBBAAAA", "1106000AMBBAAAA", "1106000I0BBAAAA", "1106000I0BBABAB", "1106000I0BBACAC", "1106000K0BBAAAA", "1106000K0BBABAB", "1106000L0BBAAAA", "1106000L0BCAAAB", "1106000L0BDAAAA", "1106000P0BBAAAA", "1106000P0BBABAB", "1106000P0BCAAAA", "1106000P0BDAAAC", "1106000P0BEAAAC", "1106000T0BBAAAA", "1106000T0BBABAB", "1106000Y0BBACAB", "1106000Z0BBAAAA", "1106000Z0BBABAB", "1106000Z0BBACAK", "1106000Z0BBADAL", "1106000Z0BBAEAP", "1106000Z0BBAFAQ", "1106000Z0BGAAAR", "1106000Z0BHAAAS", "1106000Z0BIAAAT", "1106000Z0BIABAU")
 GROUP BY month, practice_id

Denominator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     SUM(quantity) AS denominator
 FROM hscic.normalised_prescribing
 WHERE bnf_code IN ("1106000AAAAAAAA", "1106000AABBAAAA", "1106000AABCAAAA", "1106000ABAAAAAA", "1106000ABAAABAB", "1106000ABAAACAC", "1106000ABBBAAAA", "1106000ABBBABAB", "1106000ABBBACAC", "1106000ABBDAAAC", "1106000ABBEAAAC", "1106000ACAAAAAA", "1106000ACBBAAAA", "1106000ADAAAAAA", "1106000ADAAABAB", "1106000ADBBAAAA", "1106000ADBCAAAA", "1106000ADBDAAAB", "1106000AEAAAAAA", "1106000AEAAABAB", "1106000AEBBAAAA", "1106000AEBCAAAA", "1106000AEBDAAAB", "1106000AFAAAAAA", "1106000AFAAABAB", "1106000AFAAACAC", "1106000AFAAADAD", "1106000AFBBAAAA", "1106000AFBBABAB", "1106000AFBBACAC", "1106000AFBCAAAA", "1106000AFBDAAAD", "1106000AFBEAAAD", "1106000AFBFAAAD", "1106000AGAAAAAA", "1106000AGBBAAAA", "1106000AHAAAAAA", "1106000AHBBAAAA", "1106000AIAAAAAA", "1106000AIAAABAB", "1106000AIAAACAC", "1106000AIBBAAAA", "1106000AIBBABAB", "1106000AIBCABAC", "1106000AJAAAAAA", "1106000AJBBAAAA", "1106000AKAAAAAA", "1106000AKAAABAB", "1106000AKBBAAAA", "1106000AKBBABAB", "1106000ALAAAAAA", "1106000ALBBAAAA", "1106000AMAAAAAA", "1106000AMBBAAAA", "1106000I0AAAAAA", "1106000I0AAABAB", "1106000I0AAACAC", "1106000I0BBAAAA", "1106000I0BBABAB", "1106000I0BBACAC", "1106000K0AAAAAA", "1106000K0AAABAB", "1106000K0BBAAAA", "1106000K0BBABAB", "1106000L0AAAAAA", "1106000L0AAABAB", "1106000L0BBAAAA", "1106000L0BCAAAB", "1106000L0BDAAAA", "1106000P0AAAAAA", "1106000P0AAABAB", "1106000P0AAACAC", "1106000P0BBAAAA", "1106000P0BBABAB", "1106000P0BCAAAA", "1106000P0BDAAAC", "1106000P0BEAAAC", "1106000T0AAAAAA", "1106000T0AAABAB", "1106000T0BBAAAA", "1106000T0BBABAB", "1106000X0AAA4A4", "1106000X0AAABAB", "1106000X0AAACAC", "1106000X0AAAEAE", "1106000X0AAAFAF", "1106000X0AAAIAI", "1106000X0AAASAS", "1106000X0AABGBG", "1106000X0AABKBK", "1106000X0AABMBM", "1106000X0AABNBN", "1106000X0AABPBP", "1106000Y0AAABAB", "1106000Y0BBACAB", "1106000Z0AAAAAA", "1106000Z0AAABAB", "1106000Z0AAAKAK", "1106000Z0AAALAL", "1106000Z0AAAPAP", "1106000Z0AAAQAQ", "1106000Z0AAARAR", "1106000Z0AAASAS", "1106000Z0AAATAT", "1106000Z0AAAUAU", "1106000Z0BBAAAA", "1106000Z0BBABAB", "1106000Z0BBACAK", "1106000Z0BBADAL", "1106000Z0BBAEAP", "1106000Z0BBAFAQ", "1106000Z0BGAAAR", "1106000Z0BHAAAS", "1106000Z0BIAAAT", "1106000Z0BIABAU")
 GROUP BY month, practice_id