qrscu - if ModalitiesInStudy not returned, values seems to stay empty after series qr/rsp

Issue #626 resolved
Luuk created an issue

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)

  1. Luuk reporter

    I think at line 758 in qrscu, "rsp.save()" should be added to maintain the information from the series-response. Correct?

  2. Luuk reporter

    For me it works fine after adding the rsp.save() (but I thought before that I could fix something with this qrscu ....;-)).

  3. Ed McDonagh

    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>>

  4. Ed McDonagh

    @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() and get_modalities_in_study() which does a json load).

  5. Luuk 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()

  6. Luuk reporter

    Sorry @edmcdonagh, I think I mixed up while trying to fix issue #627 and thought this was the solution to the results I got. Wrong, it is doing fine without the .save So closing this issue.

  7. Log in to comment