opensafely / SRO-smr

MIT License
0 stars 0 forks source link

What type of medication review? #14

Closed brianmackenna closed 2 years ago

brianmackenna commented 3 years ago

The SRO clinical advisory group indicates it would like a measure of medication review to assess recovery of meds reviews and impact of pandemic. Instead of building our own list I've had a look at existing lists

  1. SMR -> this is new service introduced during the pandemic and a single simple code

  2. NHS Digital Care planning medication review simple reference set This is intended for care planning and has lots of different medicine review types included

UPDATE Codelist now available at https://codelists.opensafely.org/codelist/opensafely/care-planning-medication-review-simple-reference-set-nhs-digital/

  1. NHS Digital Primary Care Domain Refset I can't find the metadata for this but it appears this is more focused on monitoring activity in primary care right now. It focuses more on staff carrying out reviews e.g. 719478008 | Medication review done by nurse

I think we should

@richiecroker @LFISHER7 @orlamac @inglesp @PharmRJ any thoughts?

brianmackenna commented 3 years ago

Diff of 2 and 3 is available at https://codelists.opensafely.org/codelist/nhsd-primary-care-domain-refsets/medrvw_cod/20200812/diff/61b13c39/

Difference is obvious - one caveat is that the care palnning refset isa from many years ago so certain codes may not have actually existed in SNOMED at the time. Having review for graphs could we

brianmackenna commented 3 years ago

@LFISHER7 ha s prepared charts here - legend might need updating to be very specific on each code but I think its interpretable once you know its codelists above. Thoughts? e.g. on volumes, which one we should use in SRO etc.

https://github.com/opensafely/SRO-smr/blob/release-candidates/released_outputs/output/codelist_chart.png

LFISHER7 commented 3 years ago

A count of each code's use within each codelist can be found here

This is the sum of monthly counts.

Note that where a code appears in more than one of the codelists, the count may differ because only one code is recorded per patient per month.

brianmackenna commented 3 years ago

Great stuff @LFISHER7 . Would it be possible to

  1. add a column with the description of each code?
  2. sort by highest to lowest?
richiecroker commented 3 years ago

Hi

Combining seems the sensible thing to do.

I'm confused though why the same code has different counts on the two different codelists?

image

image

brianmackenna commented 3 years ago

@iaindillingham @LFISHER7 might have better idea but is this related to the duplicates issue (I can't find link to it)?

My understanding is that when multiple codes get recorded on the same day we only count one. The one that is counted is somewhat random?

LFISHER7 commented 3 years ago

This is a limitation of using the measures framework to get the counts. For each codelist, only one code can be returned per patient per month. The code that gets returned is the latest recorded code that month. This can lead to undercounting of some of the codes depending on how they are co-coded with other codes. We can work around this, but as a rough guide, I think this is fine

iaindillingham commented 3 years ago

As @LFISHER7 says, one code per codelist per patient-month is returned. This is the code for the last (latest) event, although it's possible to return the code for the first (earliest) event, too (find_first_match_in_period=True). It's also possible to return the number of events, to identify patient-months where multiple codes from the same codelist are returned (returning="number_of_episodes").

The duplicates issue was similar, although there weren't any duplicates because of this behaviour (opensafely/SRO-Measures#10). The counted code was also somewhat random, in that ties were resolved by event IDs.

Strictly speaking, this isn't a limitation of the measures framework; it's a limitation of how we query the backend (the same applies to both TPP and EMIS backends). Even if we side-stepped the measures framework, I don't think we'd be able to identify which code was counted without a one-to-one association between codelists and codes.