Conquest GUI query vs mysql query

  • Hello,


    right now I am a little bit confused.

    If I use the conquest GUI to querry my own server, i get another result than my querry on mysql itself. I thought about it an hour, but can't find an explanation yet.


    Example: Querry for the amount of studies with studydate Oct 2009.

    If i do it over the GUI like this:


    the result is 1497 studies coming up in the Query/Move window. The GUI itself unfortunatelly does not show the real sql command in the logfile, even when set to debug mode.


    If I connect via windows cmd directly to my conquest-database and use the sql string

    select studyinsta from dicomstudies where studydate like ('200910%'); the result is 1537 studies found.


    What could be an explanation for the missing 40 studies?


    My fear behind all this is, that when I do a Query/Move that way to another PACS, I won't send all data.


    Regards

    Steven

  • Hi Steven,


    I have do a similar query it logs:


    Query On Study

    [CONQUESTSRV1] Issue Query on Columns: DICOMStudies.StudyDate, DICOMStudies.PatientNam, DICOMStudies.PatientID

    [CONQUESTSRV1] Values: DICOMStudies.StudyDate LIKE '2019%'

    [CONQUESTSRV1] Tables: DICOMStudies


    which translates into: SELECT DICOMStudies.StudyDate, DICOMStudies.PatientNam, DICOMStudies.PatientID FROM

    DICOMStudies WHERE Values: DICOMStudies.StudyDate LIKE '2019%'


    Can you you do such a query directly on MySQL and compate the result?


    Marcel

  • so when i do


    select dicomstudies.studydate, dicomstudies.patientnam, dicomstudies.patientid

    from dicomstudies

    where dicomstudies.studydate like '200910%'


    i get my 1537 lines of result as well, since it is basically the same query i did above.


    Is Conquest really send a SQL statement with "values:" to the database where it would normally be "where"? I can't get a statement with "values:" to work.

  • Sorry that was a typo on my side.


    SELECT DICOMStudies.StudyDate, DICOMStudies.PatientNam, DICOMStudies.PatientID FROM

    DICOMStudies WHERE DICOMStudies.StudyDate LIKE '2019%'


    Not sure where the difference is then.


    Of course there might be instances where DICOMStudies.StudyDate, DICOMStudies.PatientNam, DICOMStudies.PatientID are the same for more than one studies. Try double clicking on 'series number' text and do the query again? That would query on StudyInstanceUID.


    regards


    Marcel

  • Hi Marcel,


    I think i found the issue. The conquest-GUI seems to do a GROUP BY for PatientID, when they have two or more studies at the same day. Or Maybe it is some form of DISTINCT for the return string of Date&Study&Name&PatID.

    In my case here I sorted and compared the output from the conquest-GUI and mysql INTO OUTFILE in excel.


    In the picture you can see that PatID 1413 got only one entry in the left column for the date 20090831 (thats conquest output concatenated in excel without space signs) while on the right side you can see him/her twice for that date. (thats mysql output concatenated again)


    When I query on Image level for this PatientID and StudyDate I get the same result (272 pictures) as with my mysql native query

    SELECT count(*) from dicomimages WHERE imagepat LIKE '1413' AND acqdate LIKE '20090831';

    I will count the actual amount of pictures send off by conquest tomorrow. Sending 200908% to another conquest instance and just count the images with windows explorer. Hopefully it will be the same amount than the mysql-query.

Participate now!

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