Closed zjp closed 1 year ago
Sure, if it's useful to you or other users I'd be happy to see it supported. Is this something you're already planning to work on or should I look into it? I'm not sure the API guide fully describes all of parameters clearly, but here's where the API source code is at: https://github.com/CBIIT/NBIA-TCIA/blob/master/software/nbia-api/src/gov/nih/nci/nbia/restAPI/GetSimpleSearchCriteriaValues.java.
I've been working on it, but only for the parameter shown in the documentation, and I can see from your link there are many more. :) They don't look too hard for me to put in a PR, but I'm confused about the last one: what is ModalityAndedSearchCriteria, and how does it differ from the ImageModalityCriteria argument above it?
If you have a look at https://nbia.cancerimagingarchive.net/nbia-search/ you'll see a radio button for the modality filter that lets you choose between "any" and "all". I'm assuming this ModalityAndedSearchCriteria is related to that feature.
If you select more than one image modality, using ANY returns any series that are associated with any of the modalities you selected. Clicking ALL adds an additional constraint such that it only returns the selected modalities for subjects that have all of the modalities you've selected.
As an example, if I use https://nbia.cancerimagingarchive.net/nbia-search/?ImageModalityCriteria=CT,SR,CR&MinNumberOfStudiesCriteria=1&CollectionCriteria=LIDC-IDRI the GUI returns the CR, CT and SR series for LIDC-IDRI subjects that have any of those 3 modalities.
If I switch the radio button to ALL as shown with https://nbia.cancerimagingarchive.net/nbia-search/?ImageModalityCriteria=CT,SR,CR&ModalityAll=true&MinNumberOfStudiesCriteria=1&CollectionCriteria=LIDC-IDRI it only returns the CR, CT and SR series for subjects who have all 3 of those modalities.
I wanted to follow up on https://github.com/kirbyju/tcia_utils/pull/4#discussion_r1135778838
Should we switch this issue and that PR over to implementing getSimpleSearchWithModalityAndBodyPartPaged instead?
Yeah, I confirmed with the dev team on Friday that we'll be deprecating this endpoint in one of our next releases of NBIA.
It would be pretty helpful to have a way to query the getSimpleSearchCriteriaValues endpoint, since it can return values from getModality, getBodyPartCounts, etc... in a consolidated request. Currently, to get the same amount of data for the one call it would take at least 3 calls.
Is this something you're interested in having in this library?