importconverter question

  • I have a number of studies that I need to import from a different system that all contain a '_SJS' at the end of the patient ID for every exam.


    Can the import converter strip off data at the end of the patient ID as in the following example?


    importconver0 = ifmatch "%i" "*_SJS" delete


    I may have used the wrong command, but the '_SJS' is at the end of the patient ID, I just want the importconverter to strip off the '_SJS' that is at the end of every patient ID and be left with the value that is infront of that.


    Thanks!

  • Hi,


    maybe this will help you a little bit to go on.


    Configuration of rules to modify, log or reject incoming DICOM slices
    ImportConverter0 = ifequal "%V0010,0020[0,0]","?";set 0010,0020 to "%V0010,0020[1,50]"



    First Conquest checks if the first letter/char of the patient id is a "?" - if this is true, he cuts of the "?" by setting the new id to %V0010,0020[1,50] (1 to 50 means that char 0, where he starts to count, is going to the virtual trashcan and only the rest of the new patient id is set to the new id.)
    Your Problem is, that u have your unwanted _SJS at the end of the patient id. If all PatientIDs have the same lenght (e.g. 000123 and 012345 and 654321 but not 123, 12345, 654321) all you have to to is changing the parameter [1,50] to cut of, and [0,0]","?" to [x,y]","*_SJS".


    What does your IDs look like?

  • All of these studies (90,000 give or take) are coming in from antoher site we are taking over. The techs had to hand type in all of the info... normally the patient ID's should be six digits (123456_SJS), but with typos we have some that are seven and some that are eight digits long. Is there anything that we can do in this situation?


    Thanks


  • I never really got into converters before but maybe this bit of logic can help you??


    Awaiting Marcel's return....


    So in this case...


    12345678_SJS
    1234567_SJS
    123456_SJS


    Importconvert0 = ifequal "%V0010,0020[8]","_"; set 0010,0020 to "%V0010,0020[0,7]"; newuids;
    (if 9th character is "_" truncate id to 0-7 or 8 digits long, create new uids, need to say, do nothing if spot 9 is not "_")


    ImportCoverter1 = ifequal "%V0010,0020[7]", "_"; set 0010,0020 to "%V0010,0020[0,6]" ; newuids;
    (if 8th character is "_" truncate id to 0-6 or 7 digits long, create new uids, need to say, do nothing if spot 8 is not "_")


    ImportCoverter2 = ifequal "%V0010,0020[6]", "_"; set 0010,0020 to "%V0010,0020[0,5]" ; newuids;
    (if 7th character is "_" truncate id to 0-5 or 6 digits long, create new uids, need to say, do nothing if spot 7 is not "_")


    I think you need to create newuids if you are going to change the MRN. shrug. I am sure Marcel or somebody will correct me.


    Edit: I do not remember if nop is implied in any if* statement when the condition is not met??

  • Hi,


    this looks almost right, but edit all lines to:


    Importconvert0 = ifequal "%V0010,0020[8,8]","_"; { set 0010,0020 to "%V0010,0020[0,7]"; newuids; }


    And test it. The newuids command is optional.


    Marcel

  • Thanks for everybody's help - the importconverter rules worked great - that takes a load off. Thank god for conquest!


    keep up the good work Marcel and everybody in the forums - thanks for answering questions. hopefully we can get rid of that spammer? :wink:

Participate now!

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