Posts by ellenwasbo

    I did not succeed last time with this recent date filtering, but with newer version of Conquest installed I would like to try again.


    Code
    ImportConverter0 = ifequal "%V0010,0010[0,11]","KONSTANSTEST"; lua "if os.date('%Y'..'/%m/'..'%d')==Data.StudyDate then Data:Script('{mkdir C:\dicomserver\data\Konstanskontroller\%i\; save to C:\dicomserver\data\Konstanskontroller\%i\%o.dcm;destroy;}') end"


    It fails on syntaxerror


    *** lua syntax error [string " if os.date(''..'/MR/'..'Wed Mar 06 13:39:02 2024')==Data.Study..."]:1: escape sequence too large near ''ifequal "Konstanstest","KONSTANSTEST";...


    I also tried the same with

    Code
    ImportConverter0 = lua: if os.date('%Y'..'/%m/'..'%d')==Data.StudyDate then Data:Script('ifequal "%V0010,0010[0,11]","KONSTANSTEST"; { mkdir C:\conquestdicomserver\data\Konstanskontroller\%i\; save to C:\conquestdicomserver\data\Konstanskontroller\%i\%o.dcm;destroy;}') end


    *** lua syntax error [string "if os.date(''..'/DX/'..'Wed Mar 06 13:48:38 2024')==Data.StudyD..."]:1: escape sequence too large near ''{mkdir C:dicomserve...


    The %Y and %m and %d are not interpreted correctly, but takes the conquest specific (?) meaning of the same? (%m is modality at least). I guess the slash should be some escape from that, but do not work like that. Any suggestion how the os.date right?

    Thanks - now I had no error messages (at least for incoming data that do not fit the first criteria).

    Changed StudyDate to AcqDate and hope that works (found from chapter 7.3 in the manual, but I am not sure if that terminology is related to the Data. object). I want to keep new images only, but the study might be older if the study is reused - that is the issue I am trying to solve.

    Hi,


    Our clinical PACS is autoforwarding QC images to our conquest dicom server and until now I have been happy with this import converter


    Code
    ImportConverter0 = ifequal "%V0010,0010[0,11]","KONSTANSTEST"; {mkdir C:\conquestdicomserver\data\Konstanskontroller\%i\; save to C:\conquestdicomserver\data\Konstanskontroller\%i\%o.dcm;destroy;}

    Now we struggle with the fact that out clinical PACS re-send a lot of images if new images are added to an old study-date. To ignore those old images I would like to save only those with the current date as acquisiton date. As I have never written a lua script before I've gone totally lost and hope to get som newbie help.


    I've found that I could get the current date with lua like this:


    Code
    currdate = os.date('%Y'..'/%m/'..'%d')


    and also I find the parameters now and age described in the manual for filtering on forward / get / delete


    but I cannot figure out how to use this terminology. Will I need a separate lua script to filter my importconverter to current date or could I have some sort of inline script that just fetches that current date as string so that I could write something like this:


    Code
    ImportConverter0 = ifequal "%V0010,0010[0,11]","KONSTANSTEST"; { if "%V0008,0022", currdate; {mkdir C:\conquestdicomserver\data\Konstanskontroller\%i\; save to C:\conquestdicomserver\data\Konstanskontroller\%i\%o.dcm;destroy;}}


    Thankful for any help here as I have spent way too much time only getting confused with the terminology.

    I have this importconverter in the dicom.ini file and it works fine.

    ImportConverter0 = ifequal "%V0010,0010[0,11]","KONSTANSTEST"; {mkdir C:\conquestdicomserver\data\Konstanskontroller\%i\; save to C:\conquestdicomserver\data\Konstanskontroller\%i\%o.dcm;destroy;}


    Now I need the files to be saved to a shared directory and I have not succeeded.

    I can perfectly well copy the files manually to the shared directory so I have the rights, but I need to automate things here.

    I've tried specifying the path using the mapped address (W:\...) and the \\numbers\.... and \\share-name\... None of them work.


    No I'm left with three options as I see it:

    1. - ask here for help (hopefully understand why it does not work)

    2. - try with lua script (but will that help...and I have to learn it as a newbie...)

    3. - setup a Task Scheduler to auto-backup the files to the shared folder (seems a bit like a detour)


    Best regards

    Ellen Wasbø