openhealthcare / elcid

elCID deployment for UCLH
http://elcid.openhealthcare.org.uk
Other
7 stars 3 forks source link

Search paginations #1646

Closed fredkingham closed 5 years ago

fredkingham commented 6 years ago

refs openhealthcare/opal#1565 and openhealthcare/opal#1557

and fixes them for elcid only.

Rather than translating everything into patient summaries and then cutting the data into chunks of 10, we take all patients, order them by -max_episode_id.

Then we get all of the information we want via django annotations. I've yet to be able to make searches last 20 seconds.

I'm fairly sure we could get it a lot quicker by looking at how we do the cut in _episodes_without_restrictions but that would be a different pull request and is probably not required at this time.

davidmiller commented 5 years ago

@fredkingham Assigning this to you - if we want it can we fix the test (query count - I hate that test) and merge?

We should then perhaps look at moving this wholesale into Opal v0.13 ?

fredkingham commented 5 years ago

@davidmiller I'll fix this then make a ticket to move this to v0.13.0