Hi,
I would like to auto-route dicom files through ConQuest where the string in the SeriesDescription tag is shortened to remove some unwanted text. E.g. I would like "RG Ph 0%/15.00bpm 2.0 RTP RTP Body HALF" to become "RG Ph 0%". However, I only want this to happen for files which have been scanned using the following protocol "RTP Retrospective Gating", I believe this is contained in the tag 0018,1030.
I've been reading the manual and this site and attempted it in version 1.4.16. However, I haven't been very successful, so I was hoping someone here might be able to point me in the right direction!
So far I have added the following code to dicom.ini:
# Configuration of rules to modify, log or reject incoming DICOM slicesImportconverters = 1ImportConverter0 = call RPMFilter.cq# Configuration of rules to auto-export incoming DICOM slicesForwardAssociationLevel = IMAGEForwardAssociationCloseDelay = 5ForwardAssociationRefreshDelay = 3600Exportconverters = 1ExportConverter0 = ifnotequal "%V0018,1030","RTP Retrospective Gating";stop;forward Series to PINN810S1 org %u
Then in RPMFilter.cq I have the following code:
Now the I think the RPMFilter.cq is causing the problem, likely because I'm not familar with Lua! Here's a sample from the log:
I'm not sure the variables are being picked up correctly? Do I need to delcare that I would like to use Lua somewhere or does it expect Lua?
Apologies if these are trivial questions but this is rather new to me so any help would be much appreciated.
Many thanks,
Ben