Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update opioidome.json #2907

Merged
merged 15 commits into from
Mar 29, 2022
Merged

Update opioidome.json #2907

merged 15 commits into from
Mar 29, 2022

Conversation

richiecroker
Copy link
Collaborator

reinstate measure, using DM+D to automatically create OMEs using strengths.

reinstate measure, using DM+D to automatically create OMEs using strengths.
@richiecroker
Copy link
Collaborator Author

richiecroker commented Nov 17, 2020

In brief:

I have created a new table (richard.opioid_class) which contains chemical level and simple formulation (at DM+D ING level) with an OME for each.

vpi nm form ome ref
1 96184001 Alfentanil hydrochloride nasal 30.0 PCD
2 395822005 Papaveretum injection 7.7 OA
3 387173000 Buprenorphine transdermal 100.0 OA
4 21066009 Buprenorphine hydrochloride injection 100.0 OA
5 373492002 Fentanyl transdermal 100.0 BNF
6 60886004 Morphine sulfate rectal 1.0 BNF
7 60886004 Morphine sulfate oral 1.0 BNF
8 60886004 Morphine sulfate injection 2.0 BNF
9 261000 Codeine phosphate oral 0.1 BNF
10 261000 Codeine phosphate injection 0.1 BNF
11 261000 Codeine phosphate rectal 0.1 BNF
12 442424007 Morphine tartrate injection 2.0 BNF
13 4369111000001100 Morphine anhydrous oral 1.0 BNF
14 17632411000001100 Oxycodone pectinate rectal 1.5 BNF
15 395804007 Morphine hydrochloride rectal 1.0 BNF
16 395804007 Morphine hydrochloride injection 2.0 BNF
17 395804007 Morphine hydrochloride oral 1.0 BNF
18 108505002 Tramadol hydrochloride injection 0.1 BNF
19 108505002 Tramadol hydrochloride oral 0.1 BNF
20 322538006 Dihydrocodeine tartrate oral 0.1 BNF
21 387024006 Oxycodone hydrochloride injection 3.0 BNF
22 387024006 Oxycodone hydrochloride rectal 1.5 BNF
23 387024006 Oxycodone hydrochloride oral 1.5 BNF
24 111123003 Nalbuphine hydrochloride injection 1.0 BNF
25 387485001 Hydromorphone hydrochloride oral 5.0 BNF
26 387485001 Hydromorphone hydrochloride injection 5.0 BNF
27 29190006 Fentanyl citrate oromucosal 130.0 CMS
28 29190006 Fentanyl citrate nasal 160.0 CMS
29 29190006 Fentanyl citrate buccal 130.0 CMS
30 71533000 Pentazocine lactate rectal 0.37 CMS
31 71533000 Pentazocine lactate injection 0.37 CMS
32 23883005 Methadone hydrochloride inhalation 3.0 CMS
33 23883005 Methadone hydrochloride injection 3.0 CMS
34 23883005 Methadone hydrochloride oral 3.0 CMS
35 442699004 Tapentadol hydrochloride oral 0.4 CMS
36 91013003 Pentazocine hydrochloride oral 0.37 CMS
37 322508000 Dextromoramide tartrate oral 4.0 GPN
38 322538006 Dihydrocodeine tartrate injection 0.1 GPN
39 396019002 Diamorphine hydrochloride oral 1.0 GPN
40 396019002 Diamorphine hydrochloride injection 3.0 GPN
41 396019002 Diamorphine hydrochloride inhalation 1.0 GPN
42 396019002 Diamorphine hydrochloride rectal 1.0 GPN
43 6837005 Dextropropoxyphene napsylate oral 0.1 GPN
44 56297001 Dextropropoxyphene hydrochloride oral 0.1 GPN
45 2878005 Pethidine hydrochloride oral 0.1 ABHB
46 2878005 Pethidine hydrochloride injection 0.24 ABHB
47 322554009 Dipipanone hydrochloride oral 0.5 ABHB
48 3568811000001100 Meptazinol hydrochloride injection 0.03 ABHB
49 3568811000001100 Meptazinol hydrochloride oral 0.03 ABHB
50 21066009 Buprenorphine hydrochloride oromucosal 60.0 MIMS
51 96184001 Alfentanil hydrochloride injection 30.0 PCD

This table then feeds into a new view, which calculates the OME using the DM+D strength details, prescribing data, and the OME table above:

#subquery to create a "simple" administration route. 
WITH 
simp_form AS ( 
SELECT DISTINCT vmp, #vmp code
                CASE 
                    WHEN descr LIKE '%injection%' THEN 'injection' #creates "injection" as route, regardless of whether injection or infusion. this also removes injection routes, e.g.
                    WHEN descr LIKE '%infusion%' THEN 'injection'  #s/c, i/v etc, AS often injections have many licensed routes, which would multiply the row
                    ELSE SUBSTR(form.descr, STRPOS(form.descr,".")+1) #takes the dosage form out of the string (e.g. tablet.oral) TO leave route.
                END AS simple_form 
FROM dmd.ont AS ont #the coded route for dosage form, includes vmp code 
INNER JOIN dmd.ontformroute AS form ON form.cd=ont.form #text description of route 
  )

#subquery to normalise strength to mg
,norm_vpi AS (
SELECT vmp, #vmp code
       ing, #ing code
       strnt_nmrtr_val, #numerator strength value
       strnt_nmrtr_uom, #numerator unit of measurement
       unit_num.descr AS unit_num, #numerator unit 
       unit_den.descr AS unit_den, #denominator unit
       CASE
           WHEN unit_num.descr = 'microgram' THEN vpi.strnt_nmrtr_val / 1000 #creates miligram value from mcg value
           WHEN unit_num.descr = 'gram' THEN vpi.strnt_nmrtr_val * 1000 #creates miligram value from gram value
           ELSE vpi.strnt_nmrtr_val
       END AS strnt_nmrtr_val_mg, #all listed drugs now in miligram rather than g or mcg
       CASE
           WHEN unit_den.descr = 'litre' THEN vpi.strnt_dnmtr_val * 1000 #some denominators listed as litre, so create mililitre value
           ELSE vpi.strnt_dnmtr_val
       END AS strnt_dnmtr_val_ml #denominator now in ml
FROM dmd.vpi AS vpi
LEFT JOIN dmd.unitofmeasure AS unit_num ON vpi.strnt_nmrtr_uom = unit_num.cd #join to create text value for numerator unit
LEFT JOIN dmd.unitofmeasure AS unit_den ON vpi.strnt_dnmtr_uom = unit_den.cd) #join to create text value for denominator unit

#subquery to create single BNF table for AMPs and VMPs
,vmp_amp AS 
(SELECT DISTINCT id,
                 nm,
                 bnf_code
FROM dmd.vmp #vmp table
WHERE bnf_code IS NOT NULL
UNION DISTINCT
SELECT DISTINCT vmp,
                nm,
                bnf_code
FROM dmd.amp #amp table
WHERE bnf_code IS NOT NULL)
    
#main query to calculate the OME
SELECT rx.month, 
       rx.practice, 
       rx.pct, 
       vpi.strnt_dnmtr_val_ml,
       sum(rx.quantity) as quantity,
       ing.id, #ingredient DM+D code. Combination products will have more than one ing code per VMP, e.g. co-codamol will have ing for paracetamoland codeine
       ing.nm, #ingredient name vmp.bnf_code AS bnf_code,
       vmp.nm AS vmp_nm, #VMP code
       vmp.bnf_code as bnf_code, #BNF code to link to prescribing data
       vpi.strnt_nmrtr_val_mg, #strength numerator in mg
       SUM(quantity*ome*(CASE
           WHEN ing.id=373492002 AND form.simple_form = 'transdermal' THEN (vpi.strnt_nmrtr_val_mg*72)/coalesce(vpi.strnt_dnmtr_val_ml, 1) # creates 72 hour dose for fentanyl transdermal patches, as doses are per hour on DM+D)
           WHEN ing.id=387173000 AND form.simple_form = 'transdermal' AND vpi.strnt_nmrtr_val IN (5, 10, 15, 20) THEN (vpi.strnt_nmrtr_val_mg*168)/coalesce(vpi.strnt_dnmtr_val_ml, 1) # creates 168 hour (7 day) dose for low-dose buprenorphine patch
           WHEN ing.id=387173000 AND form.simple_form = 'transdermal' AND vpi.strnt_nmrtr_val IN (35, 52.5, 70) THEN (vpi.strnt_nmrtr_val_mg*96)/coalesce(vpi.strnt_dnmtr_val_ml, 1) # creates 96 hour dose for higher-dose buprenorphine patch
           ELSE strnt_nmrtr_val_mg/coalesce(vpi.strnt_dnmtr_val_ml, 1) #all other products have usual dose - coalesce as solid dose forms do not have a denominator
       END)) AS ome_dose, 
       opioid.ome AS ome
FROM norm_vpi AS vpi #VPI has both ING and VMP codes in the table
INNER JOIN dmd.ing AS ing ON vpi.ing=ing.id #join to ING to get ING codes and name
INNER JOIN vmp_amp AS vmp ON vpi.vmp=vmp.id #join to get BNF codes for both VMPs and AMPs joined indirectly TO ING. 
INNER JOIN simp_form AS form ON vmp.id=form.vmp #join to subquery for simplified administration route
INNER JOIN richard.opioid_class AS opioid ON opioid.id=ing.id AND opioid.form=form.simple_form #join to OME table, which has OME value for ING/route pairs
INNER JOIN hscic.normalised_prescribing AS rx ON rx.bnf_code = vmp.bnf_code
WHERE rx.bnf_code NOT LIKE '0410%' #remove drugs used in opiate dependence
GROUP BY rx.month, 
         rx.practice, 
         rx.pct,
         id,
         ing.nm,
         vmp.bnf_code,
         vmp.nm,
         vpi.strnt_nmrtr_val,
         strnt_nmrtr_val_mg,
         vpi.strnt_dnmtr_val_ml,
         opioid.ome

I have compared the output of the table above with the previous one. The main differences are:

  • there are a few extra presentations which were not previously considered (e.g. codeine linctus)
  • oxycodone OMEs are reduced, as per the new OA guidance
  • there appears to have been a typo in the old calculation sheet, meaning that fentanyl transdermal patches were not showing the correct OME. This shows the benefit of the new methodology

The vast majority of the OMEs were the same for both methods.

@madwort
Copy link
Contributor

madwort commented Nov 17, 2020

nb. CI fails due to an unrelated issue which we're fixing in another PR

@madwort
Copy link
Contributor

madwort commented Nov 17, 2020

@richiecroker CI fix now merged, I think if you rebase/merge on the master branch and re-push it here, it should look better

Copy link
Contributor

@inglesp inglesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could you:

  • put the SQL for vw__opioids_total_ome and vw__opioids_total_dmd in the measure_sql directory, including the comment like one that's at the top of opioid_total_ome.sql in the same directory
  • delete opioid_total_ome.sql
  • update the list of tables here

@richiecroker
Copy link
Collaborator Author

@inglesp done

Copy link
Contributor

@inglesp inglesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an impressive piece of work -- for this much SQL it was very easy to review! But unfortunately it's not quite right, because vw__opioid_measure_dmd is going to contain duplicate rows, which means that some prescribing will be double-counted in the measure.

I think the fix will be to create a subquery (or a view if that's easier) that contains one row per BNF code, with column for ome_dose. Then, in your main query, you can join against this subquery/view, and sum over the ome_dose column.

If any of this is unclear, let me know.

@richiecroker
Copy link
Collaborator Author

richiecroker commented Nov 22, 2020

Thanks for the review @inglesp - although strangely when i've checked against the existing measure there didn't appear to be an differences in total_ome apart from where i'd expected them to be, which if we're getting duplication I don't understand. Also, re the single bnf_code and ome_dose there will be some occasions (although not in the current opioid dataset) where there are multiple ing that we may want to calculate e.g. ADQ on. How will this affect this? I'll take a closer look next week. Thanks again!

@inglesp
Copy link
Contributor

inglesp commented Nov 23, 2020

when i've checked against the existing measure there didn't appear to be an differences in total_ome apart from where i'd expected them to be, which if we're getting duplication I don't understand

How did you check this?

Also, re the single bnf_code and ome_dose there will be some occasions (although not in the current opioid dataset) where there are multiple ing that we may want to calculate e.g. ADQ on. How will this affect this?

If we've worked out the ADQ per ingredient, is it valid to sum the ADQs over a VMP's ingredients to get a VMP's ADQ? If so, that's in the fiddly/doable quadrant.

@brianmackenna
Copy link
Collaborator

I've had a brief look and I estimate this is going to be at least a half day work to review this measure. It's on my longer TODO list but likely to be awhile before I get to it.

@richiecroker
Copy link
Collaborator Author

richiecroker commented Feb 14, 2022

Latest version of opiate equivalence data, including updated links and some brief notes:

vpi nm form ome ref link notes
96184001 Alfentanil hydrochloride nasal 30 ScotPCG https://www.palliativecareguidelines.scot.nhs.uk/guidelines/pain/choosing-and-changing-opioids.aspx
395822005 Papaveretum injection 1.5 Loan https://academic.oup.com/bja/article/38/11/891/241933
387173000 Buprenorphine transdermal 100 OA https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids calculation based on buprenorphine mcg/hr to morphine mg per day
21066009 Buprenorphine hydrochloride injection 100 OA https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids assumed from oral dose
373492002 Fentanyl transdermal 100 BNF https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids
60886004 Morphine sulfate rectal 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
60886004 Morphine sulfate oral 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
60886004 Morphine sulfate injection 2 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
261000 Codeine phosphate oral 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
261000 Codeine phosphate injection 0.1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
261000 Codeine phosphate rectal 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
442424007 Morphine tartrate injection 2 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
4369111000001103 Morphine anhydrous oral 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
17632411000001105 Oxycodone pectinate rectal 1.5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
395804007 Morphine hydrochloride rectal 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
395804007 Morphine hydrochloride injection 2 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
395804007 Morphine hydrochloride oral 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html assumed from oral dose
108505002 Tramadol hydrochloride injection 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
108505002 Tramadol hydrochloride oral 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
322538006 Dihydrocodeine tartrate oral 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
387024006 Oxycodone hydrochloride injection 3 BNF https://bnf.nice.org.uk/drug/oxycodone-hydrochloride.html#indicationsAndDoses
387024006 Oxycodone hydrochloride rectal 1.5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
387024006 Oxycodone hydrochloride oral 1.5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
111123003 Nalbuphine hydrochloride injection 1 Sedation https://www.sciencedirect.com/topics/medicine-and-dentistry/nalbuphine
387485001 Hydromorphone hydrochloride oral 5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
387485001 Hydromorphone hydrochloride injection 5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
29190006 Fentanyl citrate oromucosal 130 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
29190006 Fentanyl citrate nasal 160 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
29190006 Fentanyl citrate buccal 130 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
71533000 Pentazocine lactate rectal 0.37 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
71533000 Pentazocine lactate injection 0.37 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
23883005 Methadone hydrochloride inhalation 3 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
23883005 Methadone hydrochloride injection 3 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
23883005 Methadone hydrochloride oral 3 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
442699004 Tapentadol hydrochloride oral 0.4 OA https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids
91013003 Pentazocine hydrochloride oral 0.37 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
322508000 Dextromoramide tartrate oral 2 Barnett https://pmj.bmj.com/content/postgradmedj/77/908/371.full.pdf
322538006 Dihydrocodeine tartrate injection 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
396019002 Diamorphine hydrochloride oral 1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
396019002 Diamorphine hydrochloride injection 3.3 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
396019002 Diamorphine hydrochloride inhalation 1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
396019002 Diamorphine hydrochloride rectal 1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860 assumed from oral dose
6837005 Dextropropoxyphene napsylate oral 0.1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
56297001 Dextropropoxyphene hydrochloride oral 0.1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
2878005 Pethidine hydrochloride oral 0.1 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
2878005 Pethidine hydrochloride injection 0.24 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
322554009 Dipipanone hydrochloride oral 0.5 Barnett https://pmj.bmj.com/content/postgradmedj/77/908/371.full.pdf
768496009 Meptazinol hydrochloride injection 0.03 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
768496009 Meptazinol hydrochloride oral 0.03 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
21066009 Buprenorphine hydrochloride oromucosal 60 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860 assumed from oral dose
96184001 Alfentanil hydrochloride injection 30 ScotPCG https://www.palliativecareguidelines.scot.nhs.uk/guidelines/pain/choosing-and-changing-opioids.aspx

reviewed and amended - now only uses VMP via link to generic BNF code in order to fix duplication issues
added DISTINCT back in to ensure single vmp, and added in udf calculation
changed SQL to new classification
@charliedthomas
Copy link

Agree with the opioid equivalence in the main. A couple of comments:

  • There is no fentanyl injection listed. This page suggests 0.067mg is roughly equivalent to 10mg oral morphine (ome = 150).
  • Papaveretum 20mg roughly equivalent to 13.3mg morphine, so ome should be 2/3, not 1.5
  • Tramadol injection - Zydol SPC states 1/10 - 1/6th as potent as morphine. Would seem sensible to relate this to morphine injection, not oral (i.e ome = 0.2, not 0.1). This may be worth considering for all injectables.
  • Study suggests IV hydromorphone 1mg is equivalent to 2.5mg oral hydromorphine. It would be expected that parenteral more potent, so ome = 12.5, not 5.

Otherwise, in general agreement with latest equivalence data, particularly as this should be viewed as an estimate of total ome.

@richiecroker
Copy link
Collaborator Author

Thanks to @charliedthomas for the review, I have made changes as recommended, and final table below:

vpi nm form ome ref link notes
96184001 Alfentanil hydrochloride nasal 30 ScotPCG https://www.palliativecareguidelines.scot.nhs.uk/guidelines/pain/choosing-and-changing-opioids.aspx
395822005 Papaveretum injection 0.67 Loan https://academic.oup.com/bja/article/38/11/891/241933
387173000 Buprenorphine transdermal 100 OA https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids calculation based on buprenorphine mcg/hr to morphine mg per day
21066009 Buprenorphine hydrochloride injection 100 OA https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids assumed from oral dose
373492002 Fentanyl transdermal 100 BNF https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids
60886004 Morphine sulfate rectal 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
60886004 Morphine sulfate oral 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
60886004 Morphine sulfate injection 2 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
261000 Codeine phosphate oral 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
261000 Codeine phosphate injection 0.1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
261000 Codeine phosphate rectal 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
442424007 Morphine tartrate injection 2 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
4369111000001103 Morphine anhydrous oral 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
17632411000001105 Oxycodone pectinate rectal 1.5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
395804007 Morphine hydrochloride rectal 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
395804007 Morphine hydrochloride injection 2 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
395804007 Morphine hydrochloride oral 1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html assumed from oral dose
108505002 Tramadol hydrochloride injection 0.2 SPC https://www.medicines.org.uk/emc/product/82/smpc#gref
108505002 Tramadol hydrochloride oral 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
322538006 Dihydrocodeine tartrate oral 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
387024006 Oxycodone hydrochloride injection 3 BNF https://bnf.nice.org.uk/drug/oxycodone-hydrochloride.html#indicationsAndDoses
387024006 Oxycodone hydrochloride rectal 1.5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
387024006 Oxycodone hydrochloride oral 1.5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
111123003 Nalbuphine hydrochloride injection 1 Sedation https://www.sciencedirect.com/topics/medicine-and-dentistry/nalbuphine
387485001 Hydromorphone hydrochloride oral 5 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
387485001 Hydromorphone hydrochloride injection 12.5 Reddy https://pubmed.ncbi.nlm.nih.gov/28711751/
29190006 Fentanyl citrate injection 150 Glos https://www.gloshospitals.nhs.uk/gps/treatment-guidelines/opioid-equivalence-chart/
29190006 Fentanyl citrate oromucosal 130 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
29190006 Fentanyl citrate nasal 160 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
29190006 Fentanyl citrate buccal 130 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
71533000 Pentazocine lactate rectal 0.37 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
71533000 Pentazocine lactate injection 0.37 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
23883005 Methadone hydrochloride inhalation 3 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
23883005 Methadone hydrochloride injection 3 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
23883005 Methadone hydrochloride oral 3 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
442699004 Tapentadol hydrochloride oral 0.4 OA https://fpm.ac.uk/opioids-aware-structured-approach-opioid-prescribing/dose-equivalents-and-changing-opioids
91013003 Pentazocine hydrochloride oral 0.37 CMS https://medicaid.utah.gov/Documents/files/Opioid-Morphine-EQ-Conversion-Factors.pdf
322508000 Dextromoramide tartrate oral 2 Barnett https://pmj.bmj.com/content/postgradmedj/77/908/371.full.pdf
322538006 Dihydrocodeine tartrate injection 0.1 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
396019002 Diamorphine hydrochloride oral 1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
396019002 Diamorphine hydrochloride injection 3.3 BNF https://bnf.nice.org.uk/guidance/prescribing-in-palliative-care.html
396019002 Diamorphine hydrochloride inhalation 1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
396019002 Diamorphine hydrochloride rectal 1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860 assumed from oral dose
6837005 Dextropropoxyphene napsylate oral 0.1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
56297001 Dextropropoxyphene hydrochloride oral 0.1 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860
2878005 Pethidine hydrochloride oral 0.1 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
2878005 Pethidine hydrochloride injection 0.24 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
322554009 Dipipanone hydrochloride oral 0.5 Barnett https://pmj.bmj.com/content/postgradmedj/77/908/371.full.pdf
768496009 Meptazinol hydrochloride injection 0.03 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
768496009 Meptazinol hydrochloride oral 0.03 ABHB https://www.drjcope.com/uploads/1/3/1/4/13140168/palliative_care_drug_converter_1.pdf
21066009 Buprenorphine hydrochloride oromucosal 60 GPN https://gpnotebook.com/en-gb/simplepage.cfm?ID=x20041106080748159860 assumed from oral dose
96184001 Alfentanil hydrochloride injection 30 ScotPCG https://www.palliativecareguidelines.scot.nhs.uk/guidelines/pain/choosing-and-changing-opioids.aspx

@richiecroker richiecroker dismissed inglesp’s stale review February 22, 2022 09:28

code completely rewritten to take account of VMP/AMP duplication

@richiecroker
Copy link
Collaborator Author

richiecroker commented Feb 22, 2022

Updated methodology notebook can be found here.

  • Clinical OME values have been checked by @charliedthomas

  • Methodology for calculation appears consistent with previous methodology

  • Preview version has been deployed to site, and seems to give correct items, quantity and OME.

  • "Why it matters" has been updated and blog written to explain changes.

@CarolineMorton are you able to check and approve this please, from both coding and clinical perspective?

Copy link
Contributor

@CarolineMorton CarolineMorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is absolutely fantastic work. So useful from a clinical perspective. Only minor comments. Happy to approve this.

@richiecroker Slack down for me at present so hopefully you see this is approved

Comment on lines +30 to +32
CASE WHEN unit_num.descr = 'microgram' THEN vpi.strnt_nmrtr_val / 1000 #creates miligram value from mcg value
WHEN unit_num.descr = 'gram' THEN vpi.strnt_nmrtr_val * 1000 #creates miligram value from gram value
WHEN unit_num.descr = 'mg' THEN vpi.strnt_nmrtr_val #no change if mg value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very nice in terms of documentation.

"numerator_short": "Total opioids prescribed (in OME mg)",
"denominator_short": "1000 patients",
"why_it_matters": [
"*TO BE AMENDED* The <a href='https://www.rcoa.ac.uk/faculty-of-pain-medicine/opioids-aware'> Opioids Aware</a> project seeks to ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to highlight that the TO BE AMENDED is still there in this text. Is this intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i need to make sure it's right before I publish!

"why_it_matters": [
"*TO BE AMENDED* The <a href='https://www.rcoa.ac.uk/faculty-of-pain-medicine/opioids-aware'> Opioids Aware</a> project seeks to ",
"improve prescribing of opioid analgesia. There is little evidence that opioids are helpful in long term pain, ",
"and the risk of harm increases significantly above 120mg morphine (or equivalent) per day, without much increase in benefit. ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe either add a reference or harm such as .... to text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants