qrscu - if ModalitiesInStudy not returned, values seems to stay empty after series qr/rsp
If the optional ModalitiesInStudy is not filled by the Query-SCP, it will be filled with the information returned from a series-request.
It seems however that after filling the information study_rsp.values('modalities_in_study') is still containing empty values.
Comments (13)
-
reporter -
Good spot. Have you tried it @LuukO to confirm it works?
-
reporter For me it works fine after adding the rsp.save() (but I thought before that I could fix something with this qrscu ....;-)).
-
As pointed out in ref
#626by @LuukO, when modalities_in_study is generated it is not saved.→ <<cset 6179efa6ccd1>>
-
There are no tests on that bit of code...
-
-
assigned issue to
- changed milestone to 0.8.0
-
assigned issue to
-
Isolated the generate modalities in study function so we can test it. Determined rsp.save line is not required due to the set_modalities_in_study function that writes the data into the database. Refs
#626→ <<cset 0614c7c755a7>>
-
@LuukO - can you take another look at this and see if your issue actually was not as reported, or at least this wasn't the issue?
After setting up the tests and refactoring the code to be able to test it, I can show that the
rsp.save()
line doesn't change anything.This is because we don't write directly to the database field, but rather we call a function on the database model that does a json dump into the field (hence
set_modalities_in_study()
andget_modalities_in_study()
which does a json load). -
Added ref
#626to changes. [skip ci]→ <<cset 745a39ef7e83>>
-
- changed status to resolved
Merged in issue626generatedModsNotSaved (pull request #191)
Issue626generatedModsNotSaved
fixes
#626→ <<cset 55b890bf5851>>
-
reporter - changed status to open
It seems that by another commit, this fix has been overridden.
In OpenREM 0.8.0 the generation of "modalities in study" (if not filled by PACS) is in the function _generate_modalities_in_study that doesn't save the study_rsp. The last line of that function should be: study_rsp.save()
-
Hi @LuukO - that is because the json dump in
set_modalities_in_study()
effects a save already (as per the comment above).Have you tried it with a
.save()
- am I misunderstanding? -
reporter - changed status to resolved
Sorry @edmcdonagh, I think I mixed up while trying to fix issue
#627and thought this was the solution to the results I got. Wrong, it is doing fine without the .save So closing this issue. - Log in to comment
I think at line 758 in qrscu, "rsp.save()" should be added to maintain the information from the series-response. Correct?