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
This is going to get increasingly important as measures get used more and more. The existing implementation is known to be sub-optimal in various ways, some of which are easy to fix and others which will require more thought.
This issue collects a grab bag of different ideas in no particular order
Patient properties which do not vary from interval to interval (e.g. ethnicity) could be extracted once and joined back in to the per-interval properties. (See Slack thread.)
We could do the summing and grouping in SQL on the temporary results tables and avoid pulling back all the individual patient rows (even if we no longer write them to disk).
We could possibly do the summing and grouping on the fly while running the query which would build the results table and avoid creating it entirely.
We do separate queries for each denominator. This isn't usually too bad as often then is only one denominator across a series of measures. But where there are multiple denominators this becomes multiplicatively costly. Possibly we can identify sets of denominators which can be sensibly combined in a single query.
For certain measure queries it might be possible to avoid doing one query per interval and instead query for some appropriate series of events which allows us to calculate the answer for each interval. For example, it should be possible to calculate the number of patients registered at each practice each month over a five year period by doing a single query for the relevant practice registration records rather than 60 queries, one for each month.
The text was updated successfully, but these errors were encountered:
This is going to get increasingly important as measures get used more and more. The existing implementation is known to be sub-optimal in various ways, some of which are easy to fix and others which will require more thought.
This issue collects a grab bag of different ideas in no particular order
Using a
CASE
expression to map from booleans to integers is silly and pretty easily fixable:Expand
CastToInt
operation to acceptSeries[bool]
#1313Patient properties which do not vary from interval to interval (e.g. ethnicity) could be extracted once and joined back in to the per-interval properties. (See Slack thread.)
We could do the summing and grouping in SQL on the temporary
results
tables and avoid pulling back all the individual patient rows (even if we no longer write them to disk).We could possibly do the summing and grouping on the fly while running the query which would build the
results
table and avoid creating it entirely.We do separate queries for each denominator. This isn't usually too bad as often then is only one denominator across a series of measures. But where there are multiple denominators this becomes multiplicatively costly. Possibly we can identify sets of denominators which can be sensibly combined in a single query.
For certain measure queries it might be possible to avoid doing one query per interval and instead query for some appropriate series of events which allows us to calculate the answer for each interval. For example, it should be possible to calculate the number of patients registered at each practice each month over a five year period by doing a single query for the relevant practice registration records rather than 60 queries, one for each month.
The text was updated successfully, but these errors were encountered: