Workaround for "bug" in Agfa Impax 6.6 (maybe also other versions)
While performing a c-find for studies (I only have this issue with CT studies) based on
ModalitiesInStudy='CT' Impax returns 41 studies for the past week
Modality = 'CT' Impax returns 464 studies for the past week
ModalitiesInStudy='CT' AND Modality='' (empty string) Impax returns 538 studies for the past week.
Based on the information from the PACS client the last one seems to be correct.
Now the interesting part is although it seems to match on ModalitiesInStudy correctly Impax returns an empty value for this tag using the last request.
Comments (12)
-
reporter -
reporter - edited description
-
Were your tests in the description done using Offis DCMTK or similar @LuukO?
I will need to check, but I think that with Sectra PACS, if you have a query with an inappropriate term in (such as Modality at study level), it will return nothing. If this is the case, in order to satisfy both systems there would need to be an optional flag!
For the second code suggestion, would it not be the case that the code would never be executed? If
rsp.get_modalities_in_study
were a zero length or empty string, then it would be considered false, and therefore would not get past line 559if rsp.get_modalities_in_study():
? -
reporter Just an update for now. It seems that if modalities in study is returned with an empty value you get a list with one empty value and this is considered True.
Added on line 598 in qrscu.py:
logger.debug(u"Value of modalities_in_study: {0}, bool of modalities_in_study: {1}".format(rsp.get_modalities_in_study(), bool(rsp.get_modalities_in_study())))
returns in log:
[18/Jun/2018 09:19:28] DEBUG [remapp.netdicom.qrscu:598] Value of modalities_in_study: [u''], bool of modalities_in_study: True
So the second code suggestion seems to be necessary.
-
reporter Refs Issue 627: Workaround for "bug" in Agfa Impax 6.6
Extra setting added determines if OpenREM should use the Modality tag at study level. Default value is False so default behaviour isn't changed.
Added extra check to see if first value in modalities_in_study is not empty. If it is empty modalities_in_study the variable modalities_returned is considered false.
→ <<cset 513b4e9f3032>>
-
-
reporter -
-
Moved agfa request level modality option into collapsed section. Added to docs. Minor changes to layout of template. Refs
#627→ <<cset 815288b7e784>>
-
Minor changes to layout of template. Refs
#627. [skip ci]→ <<cset 585ba6334757>>
-
Found the error in the tests that now show the .save() is required as per @LuukO comments. Refs
#627.→ <<cset df6623bd1e1a>>
-
- changed status to resolved
Merged in issue627ModalityBugImpax (pull request #200)
Fixes Issue
#627Approved-by: Ed McDonagh ed@mcdonagh.org.uk
→ <<cset 0a44ad01785e>>
- Log in to comment
I would suggest (and I did locally on our production OpenREM server) to add in qrscu.py, in _query_for_each_modality, after d.ModalitiesInStudy = mod (line 553):
To handle the empty values for ModalitiesInStudy and set the right value for modalities_returned and modality_matching, I would suggest to add after line 563 (modality_matching = False):