Posts by kakarr0t

    Thanks for the help Marcel.


    Made a modification by adding 2 functions in in [lua] string, plus printing the results with a more detailed description of the work it did.


    The part I don't understand is, why is this running with every single data import, rather than abiding by the IF statement and only running when data meets the correct criteria? Thanks. --Tim


    Code
    ImportConverter8 = if Data.StudyDescription and Data.StudyDescription:upper() ~= Data.StudyDescription then Data.StudyDescription = Data.StudyDescription:upper() end; print('ImportConverter8.0 Modified StudyDescription to ', Data.StudyDescription); if Data.PatientName and Data.PatientName:upper() ~= Data.PatientName then Data.PatientName = Data.PatientName:upper(); print('ImportConverter8.0 Modified PatientName to ', Data.PatientName) end

    Hi Marcel,


    I tried to make up my own Lua string for this, however, I'm not sure that it's working. Would you mind weighing in on it? Thanks.



    Quote

    ImportConverter8 = if Data.StudyDescription:upper() ~= Data.StudyDescription then Data.StudyDescription = Data.StudyDescription:upper() end



    Ideally, it should look to see if the data field is already upper case, if not, it should make it upper case. --Tim

    Hi Marcel. Do you know if there's a way to configure the import converter to convert all patient demographics to UPPERCASE?


    For instance ::


    a) if a name comes in as :: User, Test --> an import converter converts it to --> USER, TEST


    b) if a study description comes in as :: Head and Chest w/o --> an import converter converts it to --> HEAD AND CHEST W/O


    Thanks! --Tim

    We altered the code so that the ImportConverter only fires when it comes across appropriate data. Here's the new version in case you want to share or use it for something in the future. Thanks. --Tim



    Code
    ImportConverter6 = if string.match(Data.PatientID, '^0') then Data.PatientID = string.gsub(Data.PatientID, '^0*', ''); print ('ImportConverter6.0 Modified PatientID to ', Data.PatientID) end


    In the example below, I sent two sets of images, PatientID 45056 and PatientID 000123465.


    First patient with no leading zeros

    Quote

    Wed Mar 30 14:21:29 2016 Importconverter0.0: nop CONQUESTSRV1 KPACS_TIM CT TEST1^TEST1 45056
    Wed Mar 30 14:21:29 2016 Written file: ./data/45056/
    Wed Mar 30 14:21:29 2016 Exportconverter0.1: nop KPACS_TIM CT 45056
    Wed Mar 30 14:21:29 2016 ExportConverter0.0: forward ./data/45056 to VMTEST_ARCHIVE


    Second patient with leading zeros

    Actually, I'm noticing some strange behavior.


    After entering in this line of code into the dicom.ini file

    Code
    ImportConverter6 = Data.PatientID, nchanges = string.gsub(Data.PatientID, '^0*', ''); if nchanges>0 then print ('ImportConverter6.0 Modified PatientID to ', Data.PatientID) end


    I'm noticing that every single instance an image is sent to Conquest, this line gets printed whether ImportConverter6 actually did any work or not.

    Quote

    ImportConverter6.0 Modified PatientID to


    Any thoughts? Thanks! --Tim

    Marcel, thanks for all of your help with this, btw!


    I made and tested the recommended change and then got an error (see below). Thanks. --Tim


    Code
    #Strip Leading Zeros
    ImportConverter6 = Data.PatientID = string.gsub(Data.PatientID, '^0*', ''); if nchanges>0 then print ('Modified PatientID to ', Data.PatientID) end


    Quote

    Tue Mar 29 09:30:05 2016 *** lua run error [string "Data.PatientID = string.gsub(Data.PatientID..."]:1: attempt to compare number with nil in 'Data.PatientID = string.gsub(Data.PatientID, '^0*', ''); if nchanges>0 then print ('Modified PatientID to ', Data.PatientID) end'

    Hi Marcel, here's our DICOM.INI file (bottom of this post). I believe I found the problem.


    The number of ImportConverters was set to 6, rather than 7.... So therefore the 7th ImportConverter was previously never firing off.


    I have one other question. Do actions that are triggered in the lua get logged? Because I'm not seeing that they are. Here's the log output after I fixed the number of ImportConverters and tested patient ID 000123465 . You can see that it comes in as 000123465 and gets forwarded as 123465 , however you never see the logs created by the lua ImportConverter that actually does the work and strips the leading zeros out.





    There's not a non-lua ImportConverter6 that would take precedence. So that's not it.


    I didn't quite follow your last suggestion about putting in a print statement. perhaps i'm missing what line/where is the line to put in that string "string.gsub('000123', '^0*', '') --> "123" 1"?


    From the logs, the lua ImportConverter6 never even fires. Any other suggestions?

    Hi Marcel, I updated the .ini file and don't see in the logs where conquest is actually triggering the importconverter.


    LOGS ::
    Tue Mar 22 17:11:45 2016 Importconverter0.0: nop CONQUESTSRV1 KPACS_TIM IO TEST^TEST 000123465 201507241458 1 1.2.840.114384.44214243.779384.20150724.145833.2 1.2.840.114384.44214243.20150724.145811.2 20150724 145811.0000
    Tue Mar 22 17:11:45 2016 Importconverter1.0 executes: setifempty 0002,0016 to "EmptyAE"


    Tue Mar 22 17:16:45 2016 ExportConverter0.0: forward ./data/000123465/1.2.840.114384.44214243.20150724.145811.2_0001_000001_14586883050003.v2 to VMLTA02_ARCHIVE
    Tue Mar 22 17:16:45 2016 Exportconverter0.1: nop KPACS_TIM IO 000123465 201507241458 1 1.2.840.114384.44214243.779384.20150724.145829.1
    Tue Mar 22 17:16:45 2016 Exportconverter0.2: queued delete seri - (single object of 000123465) to
    Tue Mar 22 17:16:45 2016 Queue: retrying processing of file ./data/000123465/1.2.840.114384.44214243.20150724.145811.2_0001_000002_14586883050004.v2
    Tue Mar 22 17:16:45 2016 ExportConverter0.0: forward ./data/000123465/1.2.840.114384.44214243.20150724.145811.2_0001_000002_14586883050004.v2 to VMLTA02_ARCHIVE
    Tue Mar 22 17:16:45 2016 Exportconverter0.1: nop KPACS_TIM IO 000123465 201507241458 1 1.2.840.114384.44214243.779384.20150724.145833.2


    CODE (lua) ::
    [lua]
    #Truncates (0032,1030)/ReasonForStudy down to 64 characters
    ImportConverter5 = if Data.ReasonForStudy then Data.ReasonForStudy = string.sub(Data.ReasonForStudy, 1, 64) end


    #Strips All Leading Zeros
    ImportConverter6 = Data.PatientID = string.gsub(Data.PatientID, '^0*', '')


    Any suggestions? Thanks. --Tim

    Hi Marcel, in your message are you meaning to say the following (see below)? Because there are only a couple files that start with a c and no files that start with an h. Thanks. --Tim


    cd dicomlib
    cp c* /conquest
    cp h* /conquest


    Quote

    Hi,


    just download the 1.4.17e update and copy all c* and h* (in dicomlib) into the 1.4.17d release. That should update it.


    Marcel

    Hi, I'm attempting to install 1417d on CentOS and am having some issues. Durring the install I had a couple issues.


    1) when doing this step ::


    cd jpeg-6c make the IJG library
    ./configure
    sudo make
    sudo make install


    I got the error saying


    the directory didn't exist for /usr/local/man/man1/


    So I created those directories


    mkdir -p /usr/local/man/man1


    2) when doing this step ::


    ./maklinux


    I got an error saying


    cp: target '/usr/lib/cgi-bin' is not a directory


    What I noticed here is /usr/lib/cgi-bin did exist,
    however as a file which included everything that the arcnema.map file would normally contain.


    So I deleted the file named rm -rf /usr/lib/cgi-bin and
    then created that directory, mkdir /usr/lib/cgi-bin and
    then I was able to run ./maklinux


    3) now the problem is I get an error when launching dgate ::


    dgate -v -r


    it says -bas: dgate: command not found


    If I cd to /conquest, and then run the command with a ./ in front, I get another error (see attached image)


    dictionary file ./dgate.dic is missing, some server functions will not work correctly
    Regen Database
    ***Could not load kfactor file: ./.\dgate.sql



    Any thoughts? Thanks. --Tim

    Hi Marcel, was that last message meant for me or flukk3? I'm currently still on 1.4.17c and waiting for 1.4.17e to be ready for production... Assuming 1.4.17e maintence release isn't the official release of e, aka, not ready for production. Please let me know. Thanks! --Tim

    Hi Marcel, I just have two questions. (1) Do you know when the next official version of conquest will be ready for production environments, and (2) do you see any reason why conquest couldn't be installed on CentOS/RedHat rather than Ubuntu? Thanks. --Tim

    Hey Marcel, we recently received this error in the conquest serverstatus.log file and we have no idea what it means or why we got this error. I was hoping you could shed some light on it....? Thanks! --Tim


    Quote

    Wed Nov 4 08:32:23 2015 ***(Dyn) Encountered an invalid group order during load of DCM file (after 7fe00010)


    Wed Nov 4 08:32:23 2015 *** ExportConverter0.0: Forward failed to load DICOM object ./data/5529/1.2.840.113681.169936088.1446616226.3204.205_71100000_000012_1446651143e8bf.v2

    we've been getting an error since implementing truncating the ReasonForStudy DICOM tag (see lua ImportConverter4in the Code Section). Do you know what this means and/or can you tell if we have our config wrong? Thanks!


    Our ImportConverter's



    The error

    Quote

    Mon Aug 17 11:40:56 2015 *** lua run error [string "Data.ReasonForStudy = string.sub(Data.Reaso..."]:1: bad argument #1 to 'sub' (string expected, got nil) in 'Data.ReasonForStudy = string.sub(Data.ReasonForStudy, 1, 64)'