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

Select statement "containing" is confusing #18

Open
HaukeBartsch opened this issue Jan 9, 2025 · 0 comments
Open

Select statement "containing" is confusing #18

HaukeBartsch opened this issue Jan 9, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@HaukeBartsch
Copy link
Member

If a select statement contains: "BolusAgent containing Dotarem" the select statement might not work, even if the tag contains the string "14ml of Dotarem". The issue is caused by "containing" actually performing an "equal" operation.

Why? Tags in DICOM might contain an array of values. Something like "ORIGINAL/PRIMARY" which is an array with 2 strings. The "containing" operation of select will match your search string with each of the 2 strings in the array. So the meaning is "is any of the array elements equal to the search term Dotarem". In the above example there is only a single array element ("14ml of Dotarem"). That entry does not equal the search term so the matching fails.

Instead use the operation "regexp" which can perform this check if a string contains another string with:
BolusAgent regexp ".Dotarem."

Should we rename "containing"? Should we produce a warning if containing is used with a single string instead of with a value multiplicity of > 1?

@HaukeBartsch HaukeBartsch added the enhancement New feature or request label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant