You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The top 5 codes table for a codelist is currently calculated by specifying a measure in the study definition that is grouped by code. The code is the latest recorded code from the codelist. This was initially used as it was an easy way to give some insight into what individual codes are recorded in patients that satisfy the chosen measure.
There are a couple of issues with this:
It means the top 5 table does not show the true proportion that each code makes up. Where a patient has multiple codes recorded from a single codelist within a single time period, only the latest will be recorded.
Due to have a rolling monthly measure, for codelist 2, which has a time window longer than a month, a single recording of a code can contribute multiple times to the counts that are used to calculate the top 5 tables. For example, if the window for codelist 2 is in the same month as codelist 1 or up to 2 months before the start of the month, this code could be picked up 3 times, if it remains the latest code for that patient.
To solve 1), we can return number_of_matches_in_period for each code in each codelist and use this to calculate the top 5 table. Every code instance is then included in the count. 2) is harder to fix. We can't return the date for each code that contributes to number_of_matches_in_period. I think this means we can't use number_of_matches_in_period whilst only including counts that contribute to satisfying the measure. Instead number_of_matches_in_period can be extracted once for each code, for the entire study period and we will have to clearly explain what this table represents.
The text was updated successfully, but these errors were encountered:
LFISHER7
changed the title
Check the top 5 code tables are as expected.
Make the top 5 code tables show what they should
Apr 17, 2023
The top 5 codes table for a codelist is currently calculated by specifying a measure in the study definition that is grouped by code. The code is the latest recorded code from the codelist. This was initially used as it was an easy way to give some insight into what individual codes are recorded in patients that satisfy the chosen measure.
There are a couple of issues with this:
To solve 1), we can return
number_of_matches_in_period
for each code in each codelist and use this to calculate the top 5 table. Every code instance is then included in the count. 2) is harder to fix. We can't return the date for each code that contributes tonumber_of_matches_in_period
. I think this means we can't usenumber_of_matches_in_period
whilst only including counts that contribute to satisfying the measure. Insteadnumber_of_matches_in_period
can be extracted once for each code, for the entire study period and we will have to clearly explain what this table represents.The text was updated successfully, but these errors were encountered: