Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

Study List doesn't appear to use Limit parameter properly

Open swederik opened this issue 8 years ago • 6 comments

swederik avatar Oct 11 '18 14:10 swederik

We need to get the total number of the studies from PACS in order to show pages in the pagination area since it will be queried page by page, but it looks like there is no such DICOM standard. Another hassle is about sorting.

This issue is on hold for now.

evren217 avatar Oct 26 '18 16:10 evren217

Yes, it's nice to have the total number of studies so that the pagination area can be correct, but I'd argue this is a secondary concern. Currently, because the date range is arbitrarily constrained users may get no studies and not know why (could easily be a server misconfiguration - they don't know). Also setting the date range is not an especially obvious thing to do.

Restricting the date range was introduced, as I understand, so that fewer studies would be retrieved and the first display of studies would be quicker. But this is a flawed solution because there is nothing that says there won't be a huge number of studies in the default date range, so that would be slow anyway.

I'd say the best solution would be to use the limit and offset to do pagination with next and previous pages but don't include the widget that lets you jump ahead to an arbitrary page (it's not that useful for this kind of list anyway).

pieper avatar Oct 26 '18 22:10 pieper

@pieper I agree with you. We can get rid of the individual page buttons and have only previous/next buttons. We can disable the next button when the result is less than the rows per page (there is no more page), otherwise assume that the next page is available. There will be an edge case when the total number is a multiple of the rows per page. The last next button will be unnecessarily displayed in this case, but i think that is ok.

evren217 avatar Oct 27 '18 00:10 evren217

Yep that sounds like a good solution, let's do that. I think dcm4chee displays studies that way.

swederik avatar Oct 27 '18 07:10 swederik

I remember this limitation when I was implementing pagination in the query part of the DICOMweb demo. I went ahead and added custom headers in the DICOMcloud server to support a nice pagination control, I think the demo falls back to "Next" and "Previous" only buttons if the headers don't exist.

These are the headers I used in my case but sure won't be applicable for other DICOMweb servers: https://dicomcloud.github.io/docs/dicomcloud/pagination/

Zaid-Safadi avatar Oct 30 '18 16:10 Zaid-Safadi

Fixed in https://github.com/OHIF/Viewers/commit/99041bebde6e755c760ce19040e191aeca54834c

evren217 avatar Nov 08 '18 22:11 evren217