Dgate command to NOT run exportconverter

  • Marcel, is there a dgate command line option to skip exportconverter?


    I have a batch file (changepatid.cmd) set up to correct old patient IDs in the system. I run this batch file with the wrong/old id as the first parameter and the correct id as the second. i.e. changepatid 06-12345 12345


    The problem is that doing this fires off the exportconverters that match the modality and forwards images to several places. If there was something like "--skipexportconverter" I could add to the command line, it would be great. Let me know if there is, or if there is a different way I could do it. Thanks!

  • Hi,


    there is not. You will have to temporarily edit dicom.ini to block the exportconverter (e.g., prepend the line with a #). This can be done witout restarting the server.


    Are there situations where you would want exporters to run in this situation? Otherwise you can edit dgate.cpp and add ", 0, 1" to the parameters of SaveToDisk in routine ModifyPATIDofImageFile: i.e.,

    Code
    ...., "modpatid", 0, 1)).


    This will disable export converters.


    Marcel

  • May I add a --skipexportconvert type of a function to the wish list for the next release?


    I really can't disable all exportconverters while I am processing, because am I doing this during business hours and cannot take the routing rules offline...

  • This should be an easy fix to do on the fly -make a copy of your dicom.ini call it dicom2.ini and remove the export converters - in your batch file rename dicom.ini to dicom3.ini and rename dicom2.ini to dicom.ini then the lines for changing the id, after that rename dicom.ini to dicom2.ini and rename dicom3.ini to dicom.ini - its sloppy but should work with minimal affects on anything else.

  • Two points:
    1) Don't I have to kill/restart the service for the exportconverter change to kick in? That will kill any data stream (in or out) happening when that occurs.


    2) In my export rules, I don't normally specify the AE title for MRs. All MRs acquired are forwarded to 2 reading stations, and a home-based office. However, I do not want to send old studies to each of those locations just because I am "spring cleaning". If I am going to substitute out a different dicom.ini, I'll have to drastically change the export rules to support any modality which might send an MR to Conquest, which is not very scalable in the long run.


    By all means let me know if I am off-base. I want this to work, I just don't want to break things just to do maintenance.


    Related side questions:
    1) Does anyone know if the exportconverters run in numerical order? (i.e. exportconverter0 run before exportconverter1, etc.)
    2) Can you specify more than one AE title per export converter? (i.e. ExportCallingAE0 = MR1; MR2)
    Thanks. I'm trying to understand the power of the scripting language.

  • Hi,


    1) No: dicom.ini is reread every time - no restart is needed. But if an exportconverter is busy in a series the next image would see a different one, maybe with adverse effects.


    2) I do not understand your question.


    Related 1. They are run asynchrounously. To run them in order put them on the same exportconverter line separated by ;
    2. You can use a wildcard. For your test use e.g., "ifequal" statements (see manual).


    If you are on linux, my patch and recompile might be the better option to block exports for changing patient ID only. I will put it in for the next release - the running of the exportconverters when doing such maintenance tasks may be considered unwanted in almost all cases. This change affects: dropping, modpatid, modimage, and merging.


    Marcel

  • Unfortunately, I'm on a windows platform.
    1) Any chance I could beta test a win32 version that allows skipping exportconverters? Right now, I'm going through and correcting things like gender, birthdate, and patientid and want to avoid exportconverters.


    2) Could you expound a little bit more on the order of exportconverters? Just so I get this straight. In the manual, let's take your example:


    If SERVER2 was sending an MR to CONQUESTSRV1, would the following happen:
    a) forward forward compressed as j2 to SERVER2 (causes loop)
    AND
    b) forward patient to VIEWERAE
    AND
    c) forward study to SERVER3

  • Hi,


    If you PM me with your email address, I can send you a beta.


    The algorithm is as follows:


    for each exportconvert (from 0 to N):
    test CalledAE, CallingAE, Modality, StattionName
    test Filter
    if pass: put exportconverter command string into queue


    in each queue (all queues run in parallel and asynchronous, the order of execution is not specified):
    take new command string
    if stop: throw it away
    if defer: retry it a few minutes later
    process each command separated by ; sequentially


    In the examples: a forward to the originating server will indeed cause a LOOP. A test on CalledAE using ExportCalledAE or using a statement like ifequal "%u","SERVER2"; stop will avoid the loop. All forwards in your example will run in parallell; except in exportconverter2 (forward to RTSERVER; forward to RTSERVER2) where the later forward will happen later.


    Hope this clears things up.


    Marcel

Participate now!

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