Worklist and StudyUID

  • Marcel
    Does dgate or the worklist within have the ability to generate a StudyUID. I have a RIS that doesn't generate them and an MR that's requiring a StudyUID before it will accept the worklist entries. I know historically this has been a RIS/PACS function but wasn't sure if dgate could generate the StudyUID.

    Thanks for you time


  • Hi Steve,

    If you use dgate --loadhl7:file I think you can ask for it as follows:


    { 0x0020, 0x000d, "StudyInstanceUID", 64, SQL_C_CHAR, DT_UI, "---" },


    { 0x0020, 0x000d, "StudyInstanceUID", 64, SQL_C_CHAR, DT_UI, "*UI" },

    In dicom.sql. Do NOT regenerate the database.

    Otherwise you can add a script at the end in dicom.ini like:

    ModalityWorklistQueryResultConverter0 = Data.StudyInstanceUID = genuid()

    Which will generate a new UID for each new worklist query.


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

  • Marcel
    Thanks for that however
    I have not been using the dgate --loadhl7:file method to fill the worklist. I've been directly inserting the data into the the DICOMWorkList table via Mirth and a sql insert.

    will the lua script be called if I'm doing it that way?

    Again thanks in advance. I know it's not necessarily designed to work this way and I very much appreciate your assistance.

    Mr Johnathan Bravo

  • Hi Jonathan,

    if you are filling the database yourself you can best generate an UID yourself. The basic C code in conquest is:

    sprintf(newuid, "%s.%d.%04d", uidprefix, time(NULL), counter++)

    As long as uidprefix (conquest's one is stored in dicom.ini and generated on install) is unique and the combination of digits and dots after it is unique as well it would be fine. What software do you use to write into the database?



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

  • Marcel
    Currently using a MIRTH channel to receive from the RIS and then write out to dgate's worklist . so far everything has been working very well in general but some of the older modalities are a little trickier than others.
    I'm going to try to figure out a way to make that c call from within mirth . Or possible just have mirth's java call something locally since both dgate and mirth are on the same box.

    thanks again for your help
    Mr Johnathan Bravo

  • marcel
    I thought I had replied yesterday but It doesn't seem to have posted .
    To answer I am using a mirth channel to receive work requests from RIS and send updates to the dgate worklist table.

    as far as the sprintf statement. Been along time since I've done any c but i think that would output something like



    sprintf(newuid, "%s.%d.%04d", uidprefix, time(NULL), counter++)

    so I could do in mirth some js such as

    var uuid = UUIDGenerator.getUUID();
    var dgateprefix=124234;
    var sUid=dgateprefix + "." + uuid;

    Mr Johnathan Bravo