How to limit open query.

  • Hi,


    I am facing a problem of query to pacs without date range or without specific date assignment. many radiologists are using efilm and just click on search without specifying date or patient ID. This cause a query to all database records. is there any way to reject this type of query from pacs.


    thanks.

  • Hi,


    you can try a lua script, e.g. add something like this to dicom.ini:


    [lua]
    QueryConverter0 = if (Data.Date=='') or (Data.PatientID=='') then script('reject') end


    or


    [lua]
    QueryConverter0 = if (Data.Date=='') or (Data.PatientID=='') then Data.PatientID='xxxxxx' end


    Marcel

  • Hi,


    In dicom.ini :
    [lua]
    QueryConverter0 = if (Data.Date=='') or (Data.PatientID=='') then script('reject') end


    Shows no effect; returns query results with all PatientIDs and StudyDates. I tried with ./dgate -v for the following queries using dcmtk's findscu:
    findscu -v -aec HPSS_QR -aet HPSS -S -k 0008,0052=STUDY -k 0010,0020 -k 0008,0020 -k 0010,0010 -k 0020,000d localhost 5679
    findscu -v -aec HPSS_QR -aet HPSS -S -k 0008,0052=STUDY -k 0010,0020 -k 0008,0020="" -k 0010,0010 -k 0020,000d localhost 5679
    findscu -v -aec HPSS_QR -aet HPSS -S -k 0008,0052=STUDY -k 0010,0020 -k 0008,0020='' -k 0010,0010 -k 0020,000d localhost 5679


    Lua script in general works, since I was able to see results of this:
    [lua]
    QueryConverter0 = print("====>>",Association.Calling, Association.Called, Data.PatientID)


    How can I stop blind/wild queries? Please let me know. Thanks.

  • Hi,


    Thanks. I would like to share that the following worked for me:


    [lua]
    QueryConverter0 = if ((Data.PatientID=="*") or (Data.PatientID==nil)) and ((Data.StudyDate=="*") or (Data.StudyDate==nil)) and ((Data.PatientName=="*") or (Data.PatientName==nil)) then script('destroy') end


    Now for example:
    findscu -v -aec HPSS_QR -aet HPSS -S -k 0008,0052=STUDY -k 0010,0020 -k 0008,0020 -k 0010,0010=* -k 0020,000d localhost 5679


    Result:
    C-Find RSP: MsgID: 1 [Status=Failed: UnableToProcess]

Participate now!

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