ebmdatalab / open-nhs-hospital-use-data

For analysis of https://opendata.nhsbsa.net/dataset/secondary-care-medicines-data
0 stars 0 forks source link

Units of measure mismatches #29

Open Jongmassey opened 2 years ago

Jongmassey commented 2 years ago

When calculating the total amount of usage of a given VMP there are two points at which mismatches of units may occur:

  1. scmd.unit_of_measure_identifier <=>vpi.strnt_nmrtr_uom or vpi.strnt_dnmtr_uom
  2. ddd.DDD_UOMCD <=> vpi.strnt_nmrtr_uom or vpi.strnt_dnmtr_uom

Some of these mismatches are simple order of magnitude differences (e.g. mg-g) and may be resolved via a lookup table such as https://docs.google.com/spreadsheets/d/1YiTznOoOH0Jzt9nwvVAf14JsSgPUGUxiSiWLoPYpL6c/edit#gid=0

Some of these mismatches are less trivially resolvable such as IU<->mg, mmol<->mg and require external lookup data such as molecular weights or IU quantities. An example found by @milanwiedemann is Sodium acetate 3mmol/50ml / Sodium oxybate 2mmol/50ml / Sodium propionate 1.5mmol/50ml enema (28897511000001100)

Jongmassey commented 2 years ago

The uom mapping google sheet has been imported into bigquery as jonm.uom_relations but is as yet unvalidated

milanwiedemann commented 2 years ago

@brianmackenna, this describes a problem I ran into with the narcolepsy study, for example for "sodium oxybate"

our current conversion of ddd volume doesn't check for this so we're getting wrong answers when these measurement units dont match up