eFilm query conquest with MySQL

  • Hi,
    at first, i am a newbie with dicom, pacs , efilm, conquest and in this forum. Hi all.


    Please pardon my bad English.


    We have a new purchase, a veterinary. He would save the dicom files in an archive and databasesystem like conquest. (At now the data is local stored on one eFilm PC)


    My first test-installation was the conquest server with the Build-In Dbase II Database. On a separate PC runs an eFilm 1.4 Client. After short trouble the system runs very well. But we have 200 GB dicom files and I belief a MySQL Server is the better solution for the future. So I was very motivated to install a MySQL Server and the Conquest again, but this doesn’t work. I installed the server like the windowsmanual.pdf and the ODBC configuration. I also installed the server with Nativ MySQL driver. Both are the same issue.


    I can query the database from conquest, send data from conquest to the eFilm client and send data from eFilm to conquest. But the important, query the database from the eFilm client doesn’t work. I had no error at the eFilm client. The log on the Conquest is:


    [CONQUESTSRV1] UPACS THREAD 416: STARTED AT: Thu May 28 00:02:08 2009
    [CONQUESTSRV1] Calling Application Title : "AE_TITLE "
    [CONQUESTSRV1] Called Application Title : "CONQUESTSRV1 "
    [CONQUESTSRV1] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
    [CONQUESTSRV1] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
    [CONQUESTSRV1] (StudyRootQuery) search level: STUDY
    [CONQUESTSRV1] C-Find (StudyRoot) located 0 records
    [CONQUESTSRV1] UPACS THREAD 416: ENDED AT: Thu May 28 00:02:08 2009
    [CONQUESTSRV1] UPACS THREAD 416: TOTAL RUNNING TIME: 0 SECONDS


    Here I realize that the search level is STUDY, at the first installation the search level was PATIENT? Also the search level from conquest is PATIENT, look here: (works)


    [CONQUESTSRV1] UPACS THREAD 417: STARTED AT: Thu May 28 00:02:36 2009
    [CONQUESTSRV1] Calling Application Title : "CONQUESTSRV1 "
    [CONQUESTSRV1] Called Application Title : "CONQUESTSRV1 "
    [CONQUESTSRV1] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
    [CONQUESTSRV1] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.1.1" 1
    [CONQUESTSRV1] Presentation Context 1 "1.2.840.10008.5.1.4.1.2.2.1" 1
    [CONQUESTSRV1] Presentation Context 2 "1.2.840.10008.5.1.4.1.2.3.1" 1
    [CONQUESTSRV1] Presentation Context 3 "1.2.840.10008.5.1.4.31" 1
    [CONQUESTSRV1] (PatientRootQuery) search level: PATIENT
    [CONQUESTSRV1] C-Find (PatientRoot) located 2 records
    [CONQUESTSRV1] UPACS THREAD 417: ENDED AT: Thu May 28 00:02:37 2009
    [CONQUESTSRV1] UPACS THREAD 417: TOTAL RUNNING TIME: 1 SECONDS


    Can anyone help me ore have an idea where i have to look?


    tia Andreas

  • Hi,


    thanks for your fast reply. Here is the log from conquest:


    [CONQUESTSRV1]
    [CONQUESTSRV1] UPACS THREAD 419: STARTED AT: Thu May 28 09:39:41 2009
    [CONQUESTSRV1] A-ASSOCIATE-RQ Packet Dump
    [CONQUESTSRV1] Calling Application Title : "AE_TITLE "
    [CONQUESTSRV1] Called Application Title : "CONQUESTSRV1 "
    [CONQUESTSRV1] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
    [CONQUESTSRV1] Number of Proposed Presentation Contexts: 1
    [CONQUESTSRV1] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
    [CONQUESTSRV1] Server Command := 0020
    [CONQUESTSRV1] Message ID := 001f
    [CONQUESTSRV1] 0000,0002 28 UI AffectedSOPClassUID "1.2.840.10008.5.1.4.1.2.2.1"
    [CONQUESTSRV1] 0000,0100 2 US CommandField 32
    [CONQUESTSRV1] 0000,0110 2 US MessageID 31
    [CONQUESTSRV1] 0000,0700 2 US Priority 0
    [CONQUESTSRV1] 0000,0800 2 US DataSetType 258
    [CONQUESTSRV1] (StudyRootQuery) search level: STUDY
    [CONQUESTSRV1] 0008,0020 0 DA StudyDate (empty)
    [CONQUESTSRV1] 0008,0030 0 TM StudyTime (empty)
    [CONQUESTSRV1] 0008,0050 2 SH AccessionNumber "*"
    [CONQUESTSRV1] 0008,0052 6 CS QueryRetrieveLevel "STUDY "
    [CONQUESTSRV1] 0008,0090 2 PN ReferringPhysicianNa "*"
    [CONQUESTSRV1] 0008,1030 0 LO StudyDescription (empty)
    [CONQUESTSRV1] 0008,1040 0 LO InstitutionalDepartm (empty)
    [CONQUESTSRV1] 0010,0010 2 PN PatientName "*"
    [CONQUESTSRV1] 0010,0020 2 LO PatientID "*"
    [CONQUESTSRV1] 0010,0030 0 DA PatientBirthDate (empty)
    [CONQUESTSRV1] 0010,0040 0 CS PatientSex (empty)
    [CONQUESTSRV1] 0020,000d 0 UI StudyInstanceUID (empty)
    [CONQUESTSRV1] 0020,0010 0 SH StudyID (empty)
    [CONQUESTSRV1] Query On Study
    [CONQUESTSRV1] Failed on VR Search: 0008 1040
    [CONQUESTSRV1] (testing phase) - ignored
    [CONQUESTSRV1] Issue Query on Columns: DICOMStudies.StudyDate, DICOMStudies.StudyTime, DICOMStudies.AccessionN, DICOMStudies.ReferPhysi, DICOMStudies.StudyDescr, DICOMStudies.PatientNam, DICOMStudies.PatientID, DICOMStudies.PatientBir, DICOMStudies.PatientSex, DICOMStudies.StudyInsta, DICOMStudies.StudyID
    [CONQUESTSRV1] Values: DICOMStudies.AccessionN LIKE '%' and DICOMStudies.ReferPhysi LIKE '%' and DICOMStudies.PatientNam LIKE '%' and DICOMStudies.PatientID LIKE '%'
    [CONQUESTSRV1] Tables: DICOMStudies
    [CONQUESTSRV1] Sorting (DICOMStudies.PatientNam) DoSort := 1
    [CONQUESTSRV1] Query Distinct Tables: DICOMStudies
    [CONQUESTSRV1] Columns : DICOMStudies.StudyDate, DICOMStudies.StudyTime, DICOMStudies.AccessionN, DICOMStudies.ReferPhysi, DICOMStudies.StudyDescr, DICOMStudies.PatientNam, DICOMStudies.PatientID, DICOMStudies.PatientBir, DICOMStudies.PatientSex, DICOMStudies.StudyInsta, DICOMStudies.StudyID
    [CONQUESTSRV1] Where : DICOMStudies.AccessionN LIKE '%' and DICOMStudies.ReferPhysi LIKE '%' and DICOMStudies.PatientNam LIKE '%' and DICOMStudies.PatientID LIKE '%'
    [CONQUESTSRV1] Order : DICOMStudies.PatientNam
    [CONQUESTSRV1] Records = 0
    [CONQUESTSRV1] C-Find (StudyRoot) located 0 records
    [CONQUESTSRV1] UPACS THREAD 419: ENDED AT: Thu May 28 09:39:42 2009
    [CONQUESTSRV1] UPACS THREAD 419: TOTAL RUNNING TIME: 1 SECONDS


    This was an empty query but its the same issue as with an existing dataset.


    Andreas

  • Hm,


    this might be a mysql configuration issue. What versions of conquest and mysql are you using? It is maybe taking '%' literary instead of as a wildcard. To fix this please try adding:


    UseEscapeStringConstants = 1


    to dicom.ini (e.g., under MySQL=1)
    and restart the server


    Marcel

  • Hi,


    Conquest – 1.4.14
    MySQL – 5.1.34


    I tried the installation two times as per description in the windowsmanual.pdf, appendix 2 without php and apache. First with Native MySQL and second the current with ODBC. In both versions are the same issues.


    marcelvanherk – your tip doesn’t sadly work. :(


    Not that I am aware but I don’t believe that it is a MySQL configuration error because the query from conquest works. As I understand the query to MySQL comes in both cases from conquest? eFilm make the request at conquest and not at the MySQL directly, or is it incorrect?


    Andreas

  • Hello Andreas.


    I had similar problems when I upgraded to efilm 3.0 (I assume you might be using e-Film 3.x)


    It is due to the fact that efilm somehow "needs" to have data is "study ID" and if there is nothing there nothing will display when you query the archive, but you can still push images from conquest to efilm just like you describe.


    I Posted my problems some time ago here,
    http://www.image-systems.biz/f…=1315&start=0&hilit=efilm
    (Search for "efilm 3.0 gold - does not display list of patients.)
    and more info here.
    http://www.image-systems.biz/f…=1526&start=0&hilit=efilm



    In short description is below, you will need some database knowledge but not much to solve this, if this is your problem.


    Good luck
    Steini.



    .............................
    After a while I found out that e-Film 3.0 will not properly display query result if the field StudyID is missing. some of the modalities at the site I did the upgrade on e-Film at, do not send anything in the StudyID DICOM tag, and that "confused" e-Film 3.0 somehow.


    To "solve" this I modified the MySQL database a little.


    First did a count on how many studies have nothing in the studyID:
    select count(*) FROM `conquest`.`dicomstudies` where StudyID is null


    Then added "studyID" of my own. (dummy one, checked the affected rows against the count above):
    update `conquest`.`dicomstudies`
    set StudyID = 'steini123'
    where StudyID is null


    And finally, changed the table so it would have default value if nothing is sent:
    ALTER TABLE `conquest`.`dicomstudies` MODIFY COLUMN `StudyID` VARCHAR(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'steini123';


    This way, when Conquest is queried it will return something in the StudyID.
    I considered using Importconverters, but that would permanently change the images, and I was not to confortable with that idea.

  • Hi,


    thank you for your suggestion. But I don’t have any fields with NULL in the tables Patients and Studys.


    I tried now a third installation, now with MS SQL Express 2005. And you guess, the same in yellow. :evil:
    I don’t understand it, because all is going but the request from eFilm to conquest when I use any Database but the Built-in DBASEIII without ODBC. Why do the DBASE work and not the other?


    I believe we must install a newer version from eFilm. As I know the last free version is 1.5? Can anyone help me where I can get it? Or can you give me a good alternative for eFilm, as possible free? You know, veterinarys have no much money ;)


    Thanks
    Andreas

  • Hi,


    1) try a studyroot - study query from conquest with a * in patientname etc. That is simular to what efilm does. I seen nothing wrong with the query. I just want to make sure that ... LIKE '%' works in your MySQL. I am using mysql 5.0 releases and have seen no problems.


    I just installed an old free Efilm 1.5.3; and I have MySQL 5.0.45. The query looks like this and works fine:


    [CONQUESTSRV1] (StudyRootQuery) search level: STUDY
    [CONQUESTSRV1] 0008,0020 0 DA StudyDate (empty)
    [CONQUESTSRV1] 0008,0030 0 TM StudyTime (empty)
    [CONQUESTSRV1] 0008,0050 0 SH AccessionNumber (empty)
    [CONQUESTSRV1] 0008,0052 6 CS QueryRetrieveLevel "STUDY "
    [CONQUESTSRV1] 0008,0061 0 UN (empty)
    [CONQUESTSRV1] 0008,0090 0 PN ReferringPhysicianNa (empty)
    [CONQUESTSRV1] 0008,1030 0 LO StudyDescription (empty)
    [CONQUESTSRV1] 0008,1040 0 LO InstitutionalDepartm (empty)
    [CONQUESTSRV1] 0010,0010 0 PN PatientName (empty)
    [CONQUESTSRV1] 0010,0020 0 LO PatientID (empty)
    [CONQUESTSRV1] 0010,0030 0 DA PatientBirthDate (empty)
    [CONQUESTSRV1] 0010,0040 0 CS PatientSex (empty)
    [CONQUESTSRV1] 0020,000d 0 UI StudyInstanceUID (empty)
    [CONQUESTSRV1] 0020,0010 0 SH StudyID (empty)
    [CONQUESTSRV1] Query On Study
    [CONQUESTSRV1] Failed on VR Search: 0008 1040
    [CONQUESTSRV1] (testing phase) - ignored
    [CONQUESTSRV1] Issue Query on Columns: DICOMStudies.StudyDate, DICOMStudies.StudyTime, DICOMStudies.AccessionN, DICOMStudies.StudyModal, DICOMStudies.ReferPhysi, DICOMStudies.StudyDescr, DICOMStudies.PatientNam, DICOMStudies.PatientID, DICOMStudies.PatientBir, DICOMStudies.PatientSex, DICOMStudies.StudyInsta, DICOMStudies.StudyID
    [CONQUESTSRV1] Values:
    [CONQUESTSRV1] Tables: DICOMStudies
    [CONQUESTSRV1] Sorting (DICOMStudies.PatientNam) DoSort := 1
    [CONQUESTSRV1] Query Distinct Tables: DICOMStudies
    [CONQUESTSRV1] Columns : DICOMStudies.StudyDate, DICOMStudies.StudyTime, DICOMStudies.AccessionN, DICOMStudies.StudyModal, DICOMStudies.ReferPhysi, DICOMStudies.StudyDescr, DICOMStudies.PatientNam, DICOMStudies.PatientID, DICOMStudies.PatientBir, DICOMStudies.PatientSex, DICOMStudies.StudyInsta, DICOMStudies.StudyID
    [CONQUESTSRV1] Where : (null)
    [CONQUESTSRV1] Order : DICOMStudies.PatientNam
    [CONQUESTSRV1] Records = 1
    [CONQUESTSRV1] First record of cleaned response:
    etc


    I will test MySQL5.1.34 next.


    I would suggest to download the free version of kpacs!


    Marcel

  • Hi,


    MySQL5.1.34 (with conquest1.4.14, efilm1.5.3) works as well.


    I do notice that if I enter nothing in the mysql query fields it will find data, while if I enter * there, it will expand to ** in the query, and that does not match empty strings in the database. This seems related to the problem reported by Steini. I will report a bug to map a ** query to a * query. In DBASEIII both types of queries are already the same.


    Marcel

Participate now!

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