Prescribing of pregabalin

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 pregabalin per 1000 patients
Why it matters Pregabalin is a relatively new drug, which is increasingly used in neuropathic and other types of pain. Also its costs have reduced recently, its use is rising increasingly rapidly in the NHS. There are also concerns about the potential for abuse.
Tags Standard, Pain, Safety
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 ("0408010AEAAAAAA", "0408010AEAAABAB", "0408010AEAAACAC", "0408010AEAAADAD", "0408010AEAAAEAE", "0408010AEAAAFAF", "0408010AEAAAGAG", "0408010AEAAAHAH", "0408010AEAAAIAI", "0408010AEAAAJAJ", "0408010AEAAAKAK", "0408010AEAAALAL", "0408010AEAAAMAM", "0408010AEAAANAN", "0408010AEAAAQAQ", "0408010AEAAARAR", "0408010AEAAASAS", "0408010AEAAATAT", "0408010AEAAAUAU", "0408010AEAAAVAV", "0408010AEAAAWAW", "0408010AEAAAXAX", "0408010AEAAAYAY", "0408010AEAAAZAZ", "0408010AEBBAAAA", "0408010AEBBABAB", "0408010AEBBACAC", "0408010AEBBADAD", "0408010AEBBAEAE", "0408010AEBBAFAF", "0408010AEBBAGAG", "0408010AEBBAHAI", "0408010AEBBAIAN", "0408010AEBCAAAD", "0408010AEBCABAA", "0408010AEBCACAB", "0408010AEBCADAC", "0408010AEBCAEAE", "0408010AEBCAFAF", "0408010AEBCAGAI", "0408010AEBCAHAG", "0408010AEBDAAAA", "0408010AEBDABAB", "0408010AEBDACAC", "0408010AEBDADAD", "0408010AEBDAEAE", "0408010AEBDAFAF", "0408010AEBDAGAI", "0408010AEBDAHAG", "0408010AEBEAAAA", "0408010AEBEABAB", "0408010AEBEACAC", "0408010AEBEADAD", "0408010AEBEAEAE", "0408010AEBEAFAF", "0408010AEBEAGAI", "0408010AEBEAHAG", "0408010AEBFAAAA", "0408010AEBFABAB", "0408010AEBFACAC", "0408010AEBFADAD", "0408010AEBFAEAE", "0408010AEBFAFAF", "0408010AEBFAGAI", "0408010AEBFAHAG")
 GROUP BY month, practice_id

Denominator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     SUM(total_list_size / 1000.0) AS denominator
 FROM hscic.practice_statistics
 GROUP BY month, practice_id