use_modality_tag not respected in _query_study
Due to the rewrite of qrscu.py the lines implementing the use_modality_tag are removed. On line 586 in qrscu.py should be added:
if query.qr_scp_fk.use_modality_tag: logger.debug(u'Using modality tag in study query.') d.Modality = ''
Also the logic for determining the modality_matching (line 704 and further) has been changed. We might consider changing line 707 to:
modality_matching = False or query.qr_scp_fk.use_modality_tag
Btw. I don't know if we had an update or configuration change, but Impax now also responds correctly without "modality at study level". Using above settings both options work for me now (with or without "modality at study level"). We could also remove the option completely, maybe I was the only one suffering from this issue.
Comments (13)
-
-
reporter Ed, You are right, I was looking where it might go wrong and thought incorrectly that the use_modality_tag option was removed.
About the second part: Impax does filter on ModalitiesInStudy, but doesn't return the values (if using the modality tag). So the assumption (modality_matching is false) is incorrect .
Using the modality_tag we might be better of with some additional queries (the number of modalities minus one) then assuming that modality_matching is False.
-
- changed milestone to 0.9.0
Adding milestone so this doesn't get lost!
-
reporter Refs Issue
#709use_modality_tag was respected, but the assumption that modality_matching is false, might be wrong. So if use_modality_tag is true, modality_matching will be true as well. This takes care we always will query for all studies (in this non-conformant situation).
→ <<cset 34ff0f29466a>>
-
reporter Just tested better. Impax still doesn't return all results if modality tag is not used in a study-level query. With the small change above the query is correctly performed if "use_modality_tag" option is used.
-
Attempted to make use_modality_tag exception in modalities_matching clearer. Added suggested option for additional check of having only the right studies as suggested by @LuukO. Refs
#709→ <<cset 39ec6a3be398>>
-
Removed comment made redundant by debug message. Refs
#709→ <<cset d0e1f801919f>>
-
Correcting silly mistakes as pointed out by @LuukO (thanks!) Refs
#709→ <<cset 05d8a1a1e369>>
-
Adding in the missing space in the debug message. Refs
#709→ <<cset 4590893551a5>>
-
- changed status to resolved
Merged in Issue709UseModalityTag (pull request #269)
Fixes Issue
#709Approved-by: Ed McDonagh
→ <<cset 8972d9ad9610>>
-
- changed status to open
Bother. Need changes to be updated!
-
Adding ref
#709to changes. Fixes#709[skip ci] docs only→ <<cset 10f0abc8e2eb>>
-
- changed status to resolved
Adding ref
#709to changes. Fixes#709[skip ci] docs only→ <<cset 10f0abc8e2eb>>
- Log in to comment
I don't think it has been removed - See https://bitbucket.org/openrem/openrem/src/974071ec5eb9fd75b4ea36d3e653d308501bf77c/openrem/remapp/netdicom/qrscu.py?fileviewer=file-view-default#qrscu.py-689
The
Modality
tag is added tod
at the same time as setting theModalitiesInStudy
tag.Regarding the second part, I'm not sure what you are trying to do with your suggested edit. Can you explain further?
Thanks @LuukO