Deleting studies after import converter script

  • Hi, I'm using import converter as follows:


    ImportConverter0 = process series after 60 by /usr/bin/perl process_series.pl %P


    How do I delete the data and database entry when my script is done?


    Thank you,
    Greg

  • Hi Marcel,


    Unfortunately it doesn't work for me. If I do the following, I find that the converter only runs once.


    Code
    ImportConverter0 = process study after 10 by /usr/bin/perl gcs_series.pl %PImportConverter1 = process study after 20 by /usr/bin/perl gcs_series.pl %P


    Also I try this:


    Code
    ImportConverter0 = delete series after 10


    I get a promising message:


    Code
    Importconverter0.0 executes void: delete series after 10


    But the series is never deleted from file system.


    I am running on dgate stable version (1417) on linux.


    Greg

  • Hi Greg,


    you hit a bug. The "delete patient" block in dgate.cpp (around line 8680) is after the "delete" block (line 8360). If you are handy with recompiling the app you might reverse the two blocks: put:


    Code
    else if (memicmp(line, "delete ", 7)==0) { g = htoin(line+7, 4); e = htoin(line+12, 4); pVR = DDO->GetVR(g, e); if (pVR) { DDO->DeleteVR(pVR); OperatorConsole.printf("%sconverter%d.%d executes: %s\n", ininame, N, part, line); } else SystemDebug.printf("%sconverter%d.%d executes void: %s\n", ininame, N, part, line); }


    below


    Code
    OperatorConsole.printf("%sconverter%d.%d: queued %s - (%s %s %s of %s) to %s\n", ininame, N, part, line, level, modality, date, pat, dest);
    }


    Or you can use


    ExportConverter0 = delete series after 100


    Marcel

  • Hi Marcel,


    Unfortunately your suggestion didn't fix the problem. Exactly the same results after recompiling with the suggested code change.
    Also I still have the problem where only one ImportConverter gets run.


    When I have a chance I will try to debug and let you know. Meanwhile if you get any more ideas I can try them.


    Thanks again for your help. Merry Christmas!
    Greg

  • Hi,


    Merry Christmas to you too.


    That the script is only run once is logical, the script string is used to check for multiple 'queuing'. If you make the converters slightly different they will work both. Look into the other issue later.


    Marcel

Participate now!

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