Query PACS via the command line

  • Using the Conquest GUI it is possible to perform a basic query on another DICOM node (the hospital PACS for example). However, I would like to be able to do this from the command line (both on Linux and Windows). Moving/retrieving patients is possible using the commands like dgate --movepatient, as described in Appendix 6 of the Windows manual. But this appendix says nothing querying another DICOM node using dgate on the command line. Is this simply not supported, or is there some undocumented command that allows this?


    Roel

  • Thanks for the quick reply Marcel!


    I played around with the --patientfinder and --studyfinder command, and that does give me some results, so that's a good start! For those interested, I post two examples below.
    But it seems I can only query on PatientID or PatientName, nothing else. I checked the server log of the Conquest server that I queried (see below), and indeed it shows that it performs two separate queries on the database, one looking for a PatientID similar to the search string and one looking for a PatientName similar to the search string. It also shows that there are empty values supplied for StudyDate, ModalitiesInStudy and StudyInstanceUID, suggesting that values for these tags can be supplied, but I cannot figure out how to do that with a --studyfinder command.


    Is there a way to use the studyfinder command to query for studies based on PatientID and StudyDate, or Modality?


    Roel


    Examples


    Example patientfinder:

    Code
    dgate "--patientfinder:RZICONQUEST2|123456|%s (%s)"


    results in:

    Code
    John Doe (123456)


    Example studyfinder:

    Code
    dgate "--studyfinder:RZICONQUEST2|*456|Date: %s; modalities: %s; Patient: %s (%s)%0.0s"


    results in (the star is used as wildcard, the %0.0s formatter suppresses the appearance of the study UID):

    Code
    Date: 20140902; modalities: RTIMAGE\RTPLAN\RTSTRUCT\CT; Patient: John Doe (123456)


    Server log


  • I just answered this in another post.


    Hi,


    Hi, it works if you use "=SERIESUID" as query text for imagefinder, "=STUDYUID" for seriesfinder, and "=PATIENTID" for studyfinder. These call are used by "the xxxxfinder" webpages, i.e, when you use Find {choice} on {AE} in the top level page. Sorry that this is not documented, the calls were defined for internal use first.


    Regards,


    Marcel

  • Hi, Marcel,


    Sorry but can you give a complete sample about to use XXXfinder with "=SERIESUID" as query text for imagefinder, "=STUDYUID" for seriesfinder, and "=PATIENTID" for studyfinder?

    I had searching in the source code and I find nothing?

  • E.g.


    dgate64 --studyfinder:srv|str|fmt|file List studies on server


    means e.g.:


    dgate64 --studyfinder:CONQUESTSRV1|=PATID


    will print to stdout information all studies for a patient wihout formatting


    Marcel

Participate now!

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