Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost search results with qido + date filtering #30

Closed
mdg583 opened this issue Aug 5, 2016 · 4 comments
Closed

Lost search results with qido + date filtering #30

mdg583 opened this issue Aug 5, 2016 · 4 comments

Comments

@mdg583
Copy link

mdg583 commented Aug 5, 2016

When using the qido-rs query method, filtering first in the qido query and then filtering those results by date and modality on the client will obscure search results in certain circumstances.

For example, if a user wishes to search for studies between two dates, and if qido-rs will be used with a limit filter of say 20 (such as may be the case for a paging system), then first a qido-rs query will be made without the date filter, and the first 20 such results will be returned to the client. Then the client will remove from those any that don’t match the date filter, leaving some number of results less than 20.

Even without setting the limit filter on the qido-rs query, this is still a problem, because servers are allowed to set their own maximum for the number of returned results. (On my test server this is 1000). If the number of studies on the server is more than 1000, then when using any date filter, only the matching results of the first 1000 studies are able to be found. The others seem to just vanish from the search.

@mdg583 mdg583 changed the title lost search results with qido + date filtering Lost search results with qido + date filtering Aug 5, 2016
@mdg583
Copy link
Author

mdg583 commented Aug 8, 2016

Since commit 1a264f8, the date problem is mostly fixed since the filter is applied on the server as well. I think the modality filter may be an issue still. I don't know if it is possible to filter date and modality on the server with the dimse option? I think that would be faster for date searches when the server has a large number of images.

@swederik swederik added the bug label Sep 2, 2016
@swederik
Copy link
Member

Hi Matt,

Could you check if this modality filtering is still an issue? A filter has been added for the ModalitiesInStudy tag for DIMSE and QIDO. Note that ModalitiesInStudy may not be supported by some PACS (e.g. Orthanc).

Thanks for the bug report and your patch!

Erik

@mdg583
Copy link
Author

mdg583 commented Sep 16, 2016

Hello,
Sorry I won't be able to test this, as I've lost access to my test machine and I'm going to not be located at this medical center for a while, and I haven't been able to get this working in a virtual machine.

I modified some things a while ago to do the date filter in the queries as well, rather than on the client. I'm not sure what else this affects? It made using only the date filter a lot faster when there are lots of studies.
I tried to copy this set of changes by hand to make this patch, and so it definitely could have bugs.
studyDatePatch.txt

Also parsed patientId as an int so that its sorting happened correctly.

@swederik
Copy link
Member

No worries. I believe I applied most of the patch manually. I don't remember changing patientId though so I will have to look into that.

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants