Reading Dicom Sub Sequence

  • Hi,

    Am trying to see if Conquest can be used to do read the procedure code dicom tag and then based on the code do a forwarding. Am aware of using forward rules with Conquest. The issue is the procedure code dicom tag from the modality is stored within a subset of tags. e.g. see the 3 x attached images as to where tag "0008,0100 Code Value" is available from the modalities we use. Am unsure how to read this. lua code that I have seen accessessing the tags data, for say Modality which is not a sub set as


    How would lua read sub sets with Conquest ?

    The end outcome is:

    If Code Value matches the condition then forward to archive.

    Appreciate feedback from anyone.


  • Hi,

    the most easy way to this is with Lua, you can just say for instance


    But it can also be done with the old scripting:

    ifequal "%V/0008,1110.0/0008,1155","value"; forward to XXXX


    Marcel van Herk is developer of the Conquest DICOM server together with Lambert Zijp.

  • Hi Marcel,

    Thank you for the feedback. Right now there's a list of 15 x CT procedure codes that are to be forwarded coming from the 3 x different modalities and the rest are not to be forwarded.

    I tried the following.

    1. LUA Option

    Created a .lua file (file is attached with .txt) to test a sample one from one modality (ProcedureCode-Dicom-Tag-mod2.jpg one). In the Conquest dicom.ini file I have added this line at the end



    ExportConvertor0 = dofile("moveCTStudy.lua");

    While the data is received and stored in Conquest, the .lua portion did not happen and no forwarding occurred.

    2. Scripting option

    With the scripting option as first I need to know the modality (StationName) it's coming from before looking at the tags sequence as the Procedure Code is accessed differently from each vendor.

    However I just did a test from one modality to send and in dicom.ini file added this line


    ExportConvertor0 = ifequal "%V/0040,0275/0032,1064/0008,0100","CTABDPELV"; forward to CRGARCTHINS ;

    This also did not work while the study was received and stored but no forwarding occurred.

    Any advice ?


  • Hi Marcel,

    Thank you for pointing this out to me. I made the correction. However both the scripting way and lua way would not work using ExportConverter0 option as nothing happens.

    I decided to do this instead.

    1. Lua Option



    ImportConverter0 = dofile("moveCTStudy.lua");

    This time is executed the file with some syntax error in the .lua file. I corrected the syntax error reported and tried again and this time it seems to work as seen from the Conquest server logs

    I decided to try again with export converter way, and commented the import converter call.

    2. ExportConverter way



    ExportConverter0 = dofile("moveCTStudy.lua");

    As seen below nothing happens to execute the file, and the data is stored on Conquest DB as the destroy in lua did not happen.

    3. I also tried the scripting as an ImportConverter as per below


    ImportConverter0 = ifequal "%V/0040,0275/0032,1064/0008,0100","CTABDPELV"; forward to CRGARCTHINS ;

    It worked as expected

    What's the difference between import converter and export converter ?

    PS. I've attached the correct .lua file (saved as .txt to upload) after fixing the syntax error reported.

  • Ah,

    ExportConverters run asynchroneously each on its own thread, after the image is stored - you have to say

    (start one thread) :

    ExportConverters = 1

    ExportConverter0 = ...

    destroy has no effect in ExportConverters

    ImportConverters work before the image is stored, and are processed one by one, you can add them without specifying their number. And 'destroy' works for them.


    Marcel van Herk is developer of the Conquest DICOM server together with Lambert Zijp.