[Solved] Strip a series when routing Dicom

  • Hi!


    I'm trying to use Conquest as a Dicom Router. I'd like to be able to strip out the paperwork from the studies being routed to another system.


    Normally, our paperwork uses series number 9999 (some outside studies use just 999). When you open the images up in pacs, the paperwork lists "Series #9999), which indicates it was scanned in using PacsGear.


    Is it possible to do this with Conquest, using Import Coverters? I see there's a "delete [series XXXX]" command listed, but I haven't gotten it to work.


    thanks!

  • Hi marcelvanherk!


    Do you have the syntax for that? I tried:


    importconverter1 = ifequal "%m", "MR"; {delete series 9999; forward to STENTOR_SCP channel *; destroy}


    to strip out the paperwork, but that didn't work.

  • Hi Marcel!


    That worked! Thank you!


    One more thing; we do get paperwork from outside hospitals that may list the series as "999" instead of "9999". I tried both


    ifequal "%m", "MR"; ifnotequal "%VSeriesNumber", "9999"; ifnotequal "%VSeriesNumber", "999"; forward to STENTOR_SCP channel *


    and


    ifequal "%m", "MR"; ifnotequal "%VSeriesNumber", "9999", "999"; forward to STENTOR_SCP channel *


    but that just put the paperwork back. Is there some sort of wildcard I can here, or is it just not possible to do with a string lookup?


    Again, thank you!!!

  • Hi try this:


    ImportConverter0 = ifequal "%m", "MR"; ifequal "%VSeriesNumber", "9999"; destroy
    ImportConverter1 = ifequal "%m", "MR"; ifequal "%VSeriesNumber", "999"; destroy
    ImportConverter2 = forward to xxxx


    But this will also skip storing the reports locally.


    Marcel

  • Hi Marcel!


    Yes, that worked! So, I thought I'd add to it, so it would do MR's and CT's.


    First thing I tried was this:
    ImportConverter0 = ifequal "%m", "MR"; ifequal "%VSeriesNumber", "9999"; destroy
    ImportConverter1 = ifequal "%m", "MR"; ifequal "%VSeriesNumber", "999"; destroy
    ImportConverter2 = ifequal "%m", "CT"; ifequal "%VSeriesNumber", "9999"; destroy
    ImportConverter3 = ifequal "%m", "CT"; ifequal "%VSeriesNumber", "999"; destroy
    ImportConverter4 = forward to xxxx


    Didn't work. And I'm not sure why...unless the variable keeps MR for some reason, once you declare it in ImportConverter1.


    I tried multiple variations of the above, without success (I even tried some Boolean logic, but I guess the parser is particular at this point). So, I figured I'd try brute force...


    ImportConverter0 = modality MR ; ifequal "%VSeriesNumber", "9999"; destroy
    ImportConverter1 = modality MR ; ifequal "%VSeriesNumber", "999"; destroy
    ImportConverter2 = modality CT ; ifequal "%VSeriesNumber", "9999"; destroy
    ImportConverter3 = modality CT ; ifequal "%VSeriesNumber", "999"; destroy
    ImportConverter4 = forward to xxxx *;


    THAT worked!!! (threw a TON of errors in the log, though, as I expected!). I guess I'll have to go back to "variable" school!
    Thanks again for your help, Marcel!

  • Hi,


    I think the first 'if' skips a single statement so I guess it should have been:


    ifequal "%m", "MR"; { ifequal "%VSeriesNumber", "9999"; destroy; }


    The second form contains an invalid statement. So effectively it reads


    ifequal "%VSeriesNumber", "999"; destroy


    The syntax of Lua is clearer; try this (ImportConverter0 all on one line):


    ImportConverter1 = forward to xxxx channel *


    [lua]
    ImportConverter0 = if (Data.Modality=='CT' or Data.Modality=='MR') and (Data.SeriesNumber=='999' or Data.SeriesNumber=='9999') then script('destroy') end


    Marcel

  • Hi Marcel!


    It worked! Thank you!


    I actually found out how to get rid of all the paperwork (including Dose Reports), doing this:


    ImportConverter0 = ifequal "%m", MR ; {ifequal "%VMedia Storage SOP Class UID", "1.2.840.10008.5.1.4.1.1.7"; destroy;}
    ImportConverter1 = ifequal "%m", CT ; {ifequal "%VMedia Storage SOP Class UID", "1.2.840.10008.5.1.4.1.1.7"; destroy;}
    ImportConverter2 = forward to XXXXXXX_SCP channel *; destroy



    The tag for SOP Class UID is 1.2.840.10008.5.1.4.1.1.7 (which is the Secondary Capture (SC) Image Information Object Definition (IOD) that specifies images that are converted from a non-DICOM format to a modality independent DICOM format.) Perfect for stripping out all DICOM that was not sent originally from the modality, which is what I want. The tag for that is "Media Storage SOP Class UID", (had to figure that out from the Dicom Header, as "SOPClassUID" didn't work).


    Thanks again for all your help!


    John F.

Participate now!

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