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

let dicomweb-client handle pagination #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vanossj
Copy link
Contributor

@vanossj vanossj commented Aug 30, 2022

Newer versions of dicomweb-client have a get_remaining param that will handle the offset/limit pagination and return all the studies/series/instances queried

@lassoan
Copy link
Owner

lassoan commented Aug 30, 2022

DCM.js DICOM server (and maybe others) don't do pagination: they simple ignore the offset parameter and always return all results. That's why the duplicate study instance UID check was added into this extension's pagination implementation.

Does DICOMweb-client's pagination implentation include such duplicate instance UID check?

@vanossj
Copy link
Contributor Author

vanossj commented Apr 14, 2023

blocked by this issue in dcmjs server

@vanossj vanossj marked this pull request as ready for review April 14, 2023 17:31
@lassoan
Copy link
Owner

lassoan commented Apr 28, 2023

One solution to get this merged would be to convince dicomweb-client developers to allow more robust pagination. Essentially, suggest them to implement the same #19 to be able to communicate with all servers that do not support pagination.

The API could be something like

self.DICOMwebClient.search_for_studies(get_remaining_auto=True)

or

self.DICOMwebClient.search_for_studies(get_remaining=True, prevent_duplicates=True)

Or the option could be always enabled, but a warning would be displayed when the loop is ended due to duplicate item. We would need a way to suppress this warning though, as we would not want to pollute the logs with this (although the behavior does not conform to the standard, it is a harmless error).

If dicomweb-client developers don't wan to do this (whichi would be understandable, because it would mean that their client would be more complex because of server non-conformances) then the dcmjs server must be fixed before this can be merged.

@vanossj
Copy link
Contributor Author

vanossj commented Apr 28, 2023

I think the right answer is to fix DCMjs

@lassoan
Copy link
Owner

lassoan commented Apr 28, 2023

In that case, I think we should change this PR to just add a comment in the code in _get_all_pages describing what change to make when dcmjs-org/dicomweb-server#19 is fixed.

@vanossj vanossj force-pushed the use-get-remaining-param branch from 0696ec6 to 27312b6 Compare April 28, 2023 15:02
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

Successfully merging this pull request may close these issues.

2 participants