Marcel,
thanks a lot! This now works as expected. I'm using a delay of 180sec which works out fine.
I'm trying to accomplish one more thing with this script.
When the prior is found with the query, if it contains a 'SeriesDescription' that contains 'Cad', I would like it to NOT forward that series.
Would the best way to go about this be to add something to the query like 'q.SeriesDescription ~= 'Cad'' or should I add another 'if' statement? Maybe there is a way to use one of the existing 'if' statements?
eg.
if Data.StudyInstanceUID ~= s[1].StudyInstanceUID and s[1].SeriesDescription ~= '*Cad*' then
script("forward patient study ".. s[1].StudyInstanceUID .. " after 180 to SERVER1")
If I have the code above correct, can I use the wild card as I have it above?
thanks for all of your help with this!