Linux Mysql ExportFilter0 Problem

  • Hello,


    i have following:


    *Debian Etch 2.6.18-5-amd64 (64 BIT)
    *./dgate -version
    DGATE (1.4.13, build Thu Feb 21 14:40:36 2008) is running as threaded server
    Started 1 export queue thread(s)
    *and MySQL 5.0.32


    I have fixed the
    odbci.hpp and changed the path of mysql.h


    i compiled it with this
    g++ -DUNIX -DNATIVE_ENDIAN=1 -DNOINTJPEG -DUSEMYSQL total.cxx -o dgate -lpthread -L/usr/lib/mysql -lmysqlclient



    And it works fine.
    Now i wan't to add a Autoforward


    All Images with
    ReferPhysi LIKE 'HE%'
    should forward to AE_Fisch


    i do this:
    ExportConverters = 1
    ExportFilter0 = ReferPhysi LIKE 'HE%'
    ExportConverter0 = forward to AE_FISCH


    In the Log:


    Query Tables: DICOMImages
    Columns : ObjectFile, DeviceName
    Where : SOPInstanc = '1.2.392.200036.9125.9.0.118487311.202050304.635121783' AND ImagePat = '10848180'
    Order : (null)
    Query Tables: DICOMImages
    Columns : SOPInstanc,SOPClassUI,ImageNumbe,ImageDate,ImageTime,EchoNumber,NumberOfFr,AcqDate,AcqTime,ReceivingC,AcqNumber,SliceLocat,SamplesPer,PhotoMetri,Rows,Colums,BitsStored,ImageType,ImageID,ImagePat,SeriesInst
    Where : SOPInstanc = '1.2.392.200036.9125.9.0.118487311.202050304.635121783' AND ImagePat = '10848180'
    Order : (null)
    Update Table: DICOMImages
    Updates : SOPInstanc = '1.2.392.200036.9125.9.0.118487311.202050304.635121783', SOPClassUI = '1.2.840.10008.5.1.4.1.1.1', ImageNumbe = '1003', ImageDate = '20080219', ImageTime = '101228.203', AcqDate = '20080219', AcqTime = '101215.312', AcqNumber = '018', SamplesPer = '1', PhotoMetri = 'MONOCHROME1', Rows = '2140', Colums = '1760', BitsStored = '10', ImageType = 'DERIVED\\PRIMARY\\POST_PROCESSED\\100000', ImagePat = '10848180', SeriesInst = '1.2.392.200036.9125.3.112193711948.64545759538.1828196', AccessTime = 1203608832, ObjectFile = '10848180/1.2.392.200036.9125.3.112193711948.64545759538.1828196_1001_001003_12035979670188.v2', DeviceName = 'MAG0'
    Where : SOPInstanc = '1.2.392.200036.9125.9.0.118487311.202050304.635121783' AND ImagePat = '10848180'
    Written file: ./data/10848180/1.2.392.200036.9125.3.112193711948.64545759538.1828196_1001_001003_12035979670188.v2
    Arena 0:
    system bytes = 7569408
    in use bytes = 315424
    Arena 1:
    system bytes = 135168
    in use bytes = 2240
    Total (incl. mmap):
    system bytes = 8839168
    in use bytes = 1452256
    max mmap regions = 7
    max mmap bytes = 23744512
    C-Move (StudyRoot)
    Arena 0:
    system bytes = 7569408
    in use bytes = 346608
    Arena 1:
    system bytes = 135168
    in use bytes = 2240
    Total (incl. mmap):
    system bytes = 8839168
    in use bytes = 1483440
    max mmap regions = 7
    max mmap bytes = 23744512
    UPACS THREAD 3: ENDED AT: Thu Feb 21 15:47:27 2008
    UPACS THREAD 3: TOTAL RUNNING TIME: 0 SECONDS
    Query Tables: DICOMImages, DICOMSeries, DICOMStudies, DICOMPatients
    Columns : DicomImages.ObjectFile
    Where : (ReferPhysi LIKE 'HE%') and DICOMImages.SopInstanc = '1.2.392.200036.9125.9.
    Inst = DICOMSeries.SeriesInst and DICOMSeries.StudyInsta = DICOMStudies.StudyInsta AND DIC
    Order : (null)
    ***Filter: Unable to query for image record
    UPACS THREAD 2: ENDED AT: Thu Feb 21 15:47:28 2008
    UPACS THREAD 2: TOTAL RUNNING TIME: 1 SECONDS


    Without a filter ist works..


    thanks for your help

  • oh soory you're right:


    I exported the log in an textfile, so it is now complete:
    ./dgate -v >> serverstatus.log



    Code
    UPACS THREAD 1: ENDED AT: Fri Feb 22 09:47:40 2008
    UPACS THREAD 1: TOTAL RUNNING TIME: 0 SECONDS
    Query Tables: DICOMImages, DICOMSeries, DICOMStudies, DICOMPatients
    Columns : DicomImages.ObjectFile
    Where : (ReferPhysi LIKE 'HE%') and DICOMImages.SopInstanc = '1.2.392.200036.9125.9.0.118441489.231213824.635121783' and DICOMStudies.PatientID = DICOMPatients.PatientID and DICOMImages.SeriesInst = DICOMSeries.SeriesInst and DICOMSeries.StudyInsta = DICOMStudies.StudyInsta AND DICOMImages.ImagePat = '10848245'
    Order : (null)
    ***Filter: Unable to query for image record
    UPACS THREAD 0: ENDED AT: Fri Feb 22 09:47:40 2008
    UPACS THREAD 0: TOTAL RUNNING TIME: 1 SECONDS



    can you see anything.
    thanks
    SF

  • For Info:


    i do this SQl-Querry via phpmyadmin and i geht a positiv result:


    SELECT *
    FROM `DICOMImages` , `DICOMSeries` , `DICOMStudies` , `DICOMPatients`
    WHERE (
    ReferPhysi LIKE 'HE%'
    )
    AND DICOMImages.SopInstanc = '1.2.392.200036.9125.9.0.118441489.231213824.635121783'
    AND DICOMStudies.PatientID = DICOMPatients.PatientID
    AND DICOMImages.SeriesInst = DICOMSeries.SeriesInst
    AND DICOMSeries.StudyInsta = DICOMStudies.StudyInsta
    AND DICOMImages.ImagePat = '10848245'
    LIMIT 0 , 30

  • Ah, I see. MySql is case sensitive, so this string might be wrong, as well as many other queries in the code. Since I develop under windows I do not notice such mistakes ;->>>>


    Columns : DicomImages.ObjectFile


    Maybe you can try to change the code it in dgate.cpp routine TestFilter around line 2300 as follows:


    From

    Code
    if (!aDB.Query(Tables, "DicomImages.ObjectFile", QueryString, NULL)) { OperatorConsole.printf("***Filter: Unable to query for image record\n"); aDB.Close(); return 0; }


    to

    Code
    if (!aDB.Query(Tables, "DICOMImages.ObjectFile", QueryString, NULL))
    {
    OperatorConsole.printf("***Filter: Unable to query for image record\n");
    aDB.Close();
    return 0;
    }


    Recompile and see what happens.


    Thanks,


    Marcel

  • SUPER! It works.


    Thank you very much :-)


    an nother question:


    it is possible to do somesink like this


    I wan't to forward all Images wehre
    ReferPhysi LIKE 'HE%'
    and Additionally all images for this patient of the 2 last years.
    But only the images form the same modality as the actually pics.


    thanks

  • Hi,


    that is in the next release ("export patient to AE age -days+days modality %m"), but I do not have a linux distro for that yet. I you are eager to test I can send the modified dgate.cpp.


    Marcel

Participate now!

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