Modifying inconsistent series modality tags

  • I am looking for suggestions on how to change the series modality tag (0008,0060) for scanned documents from "OT" to equal the modality type of the other series in the study.

    For example, if a study is received that has a series with series modality tag of "DX", and there is a scanned document in another series in the study with modality tag of "OT", I'd like to change the scanned document to a series modality tag of "DX". I'm not sure how to trigger a script to perform this change after all the images have been received.

    Thanks in advance for any assistance.

  • Hi,

    During reception you can do something like:


    ImportConverter0 = if Data.Something=='DX' and Data.Modality='OT' then Data.Modality='DX' end

    Afterward you can do it as well, but it is more elaborate.


    ImportConverter0 = process series by dosomething.lua(%VSeriesInstanceUID)

    Where command_line in dosomething.lua would recieve the Series Instanace UID. You then used something like servercommand('modifyseries::'..command_line'..'set %Modality to "DX"')


  • Marcel, that you for the response.

    The main problem is that not all the series modality types are known until the entire exam has been received.

    For that reason I believe that I am going to be forced to determine and change the modality type once the exam transfer is complete.

    I've written a script that executes every minute that looks for complete exams and then changes the modality types using dgate --modifyseries. Then it changes the StudyModal field in the database to that value too.

    I'd thought about using --modifystudies, but in instance where there's a single series that requires changing, and ten other series that don't require changing, I didn't want to waste time.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!