Change Dicom tag on C-Move

  • Marcel, I need to c-move a lot of studies to another PACS. I'd like to change the accession dicom tag as I send the data. Is this possible? I saw examples of importconverters changing the data when it first arrives, but what if I just want to change it when it leaves?


    For example, if the accession number is "0" or blank, and it is being sent to PACSDUMP, I'd like to change it to be a string based on the current date/time (to make it unique). Is there an "if...then" statement you can toss my way?


    Thanks again for an awesome product. -Scott

  • Hi,


    you can play with: RetrieveResultConverter0. This processes outgoing data. Try (on 1.4.15(abc) or 1.4.16alpha):


    Code
    RetrieveResultConverter0 = ifnotequal "%V0008,0050", "0"; {ifnotempty "%V0008,0050"; stop; }; set 0008,0050 to %A0020,000e


    if the accession number is set it stops; otherwise it sets it to the 32 bit CRC of the studyinstanceuid (almost unique but same for entire study).


    Marcel

  • First of all, I am on 1.4.14, but I can upgrade. Is the upgrade the usual: backup the conquest exe directory, stop the service, replace the contents of the conquest directory, start the service?


    Second, can I add a destination qualifier, or maybe a calledAE qualifier. Example?


    Thanks! -Scott

  • Hi,


    you can just stop the service, backup dgate.exe and replace it with one from 1.4.15c or 1.4.16alpha (just released a few minutes ago ;->>>), and start it again. Replacing the GUI is optional. I would be careful with the 1.4.16alpha release if you really depend on JPEG. It is much better as it was but not heavily tested.


    As for the RetrieveResultConverter it supports %s which is the C_MOVE destination. %c (called) and %u (calling) are not supported. To see what you can read from the various entries and/or debug the statement use a NOP converter.


    Marcel

  • Thanks. I'll stick to 1.4.15c <grin>.


    I tried adding

    Quote

    RetrieveResultConverter0 = ifnotequal "%V0008,0050", "0"; {ifnotempty "%V0008,0050"; stop; }; set 0008,0050 to %A0020,000e

    to my dicom.ini, but it didn't seem to work. Do I need to add anything else besides this line?

  • Hi,


    I just noticed that the converter is only enabled for our NKI specific SOP, that allows for instance, to downsize the image. So you need a workaround.


    Try to set the compression level of your target to s0 (in acrnema.map), and specify your converter as the following item in dicom.ini:


    CompressionConverter0 = ...


    To debug do


    CompressionConverter0 = NOP ....


    This mechanism allows 10 different converters (s0..s9) for outgoing traffic. Any method to set the outgoing compression can be used to enable this option.


    Good luck,


    Marcel


  • I tried a few things, but maybe I am not fully understanding. Do I put the same "if...then" logic after CompressionConvertor0?
    I have some test studies with empty accession numbers and tried:

    Code
    CompressionConverter0 = ifnotequal "%V0008,0050", "0"; {ifnotempty "%V0008,0050"; stop; }; set 0008,0050 to %A0020,000e
    but got the following in my log:
    2/3/2010 9:32:27 AM [PACSADMIN] Compressionconverter0.0: nop ifnotequal "", "0"
    2/3/2010 9:32:27 AM [PACSADMIN] Compressionconverter0.1 executes: ifnotempty ""
    2/3/2010 9:32:27 AM [PACSADMIN] Compressionconverter0.2 not executed because of previous statement


    Is there any way you could please show me a specific example? I created the acrnema.map entry, but I am having trouble "filling in the blanks".


    Thanks! -Scott

  • Ah,


    a bug in the converter code:


    RetrieveResultConverter0 = ifnotequal "%V0008,0050", "0"; {ifnotempty "%V0008,0050"; stop; }; set 0008,0050 to %A0020,000e


    should be


    RetrieveResultConverter0 = ifnotequal "%V0008,0050", "0"; {ifnotempty "%V0008,0050"; stop; }; set 0008,0050 to "%a0020,000e"


    Marcel

  • Woot! Marcel, I could kiss you :D


    It is working now. Unfortunately, I found some joker was also putting "1" as the accession number. What is the syntax to add another if...then to this line to check for "1":

    Code
    CompressionConverter0 = ifnotequal "%V0008,0050", "0"; {ifnotempty "%V0008,0050"; stop; }; set 0008,0050 to "%a0020,000e"
  • Hi,


    Kisses from girls only please ;->>>


    A much easier one to try:


    Code
    CompressionConverter0 = ifempty "%V0008,0050[1,1]; set 0008,0050 to "%a0020,000e"


    This sets the accessionnumber when its second character is empty, i.e, when its lenght is zero or one.


    Marcel

  • That would cover any single digit accession number, correct?


    What happens in a "mixed accession" study? For example, if a CT was performed with accession number 12345, and then paperwork was digitized as another series with accession number 0? What becomes the accession number for the whole study?






    {I was kidding about the kiss - how 'bout a beer if you are ever in the Pacific Northwest of the US}


    -Scott

  • Hi,


    only the paperwork would get a new accession number derived from the studio UID. All other images would keep their original one. Or just leave out the ifempty and replace all the accession numbers (maybe back up the original one in a private tag).


    And yes, beer will do fine ;->>>


    Marcel

Participate now!

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