Pregabalin capsules prescribed as Lyrica

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 quantity of Lyrica capsules, as a proportion of total capsules of pregabalin.
Why it matters In 2015 NHS England were required to recommend to GPs that when used for pain pregabalin should be prescribed as the branded product Lyrica, in order to be in line with the patent. In July 2017 this guidance was rescinded as the patent for pain had expired. Costs of the generic product fell sharply in August 2017, and practices should now follow normal practice for prescribing, i.e. usually prescribe by the generic name.
Tags Standard, Cost Saving, Pain
Implies cost savings Yes
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 ("0408010AEBBAAAA", "0408010AEBBABAB", "0408010AEBBACAC", "0408010AEBBADAD", "0408010AEBBAEAE", "0408010AEBBAFAF", "0408010AEBBAGAG", "0408010AEBBAHAI")
 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 ("0408010AEAAAAAA", "0408010AEAAABAB", "0408010AEAAACAC", "0408010AEAAADAD", "0408010AEAAAEAE", "0408010AEAAAFAF", "0408010AEAAAGAG", "0408010AEAAAIAI", "0408010AEAAASAS", "0408010AEAAATAT", "0408010AEAAAUAU", "0408010AEAAAVAV", "0408010AEAAAWAW", "0408010AEAAAXAX", "0408010AEAAAYAY", "0408010AEAAAZAZ", "0408010AEBBAAAA", "0408010AEBBABAB", "0408010AEBBACAC", "0408010AEBBADAD", "0408010AEBBAEAE", "0408010AEBBAFAF", "0408010AEBBAGAG", "0408010AEBBAHAI", "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