Bug 19

Summary: query retrieve wildcard problems
Product: Orthanc Reporter: Sébastien Jodogne <s.jodogne>
Component: Orthanc ExplorerAssignee: Sébastien Jodogne <s.jodogne>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: unspecified   
Hardware: All   
OS: All   

Description Sébastien Jodogne 2020-06-29 15:11:35 CEST
[BitBucket user: Francisco Venancio]
[BitBucket date: 2016-07-03.21:50:11]

I've deployed orthanc to query/retrieve from dcm4chee without a problem, but as we tried to use the same setup to query directly from modalities we noticed the OrthancExplorer always came up with empty queries. 

We changed query-retrive.js to send empty strings instead of asterisks as wildcard and it solves the problem with these modalities. Dcm4chee has no trouble when receiving empty strings as well, but I wouldn't change it without checking if other modalities that are working with asterisks don't break with empty strings.
Comment 1 Sébastien Jodogne 2020-06-29 15:19:06 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2016-07-04.06:45:04]

Hello, in the "DicomModalities" configuration option of Orthanc, you can specify a manufacturer as a fourth parameter to one modality, which enables some application-specific patches. Have you tried setting this fourth parameter to "Dcm4Chee"? https://hg.orthanc-server.com/orthanc/file/Orthanc-1.1.0/Resources/Configuration.json
Comment 2 Sébastien Jodogne 2020-06-29 15:19:07 CEST
[BitBucket user: Francisco Venancio]
[BitBucket date: 2016-07-11.14:42:39]

Yes, I'm aware of the manufacturer fourth parameter.
Perhaps I was not clear. The issue is about the response to calls to /modalites/{modality}/query . In Orthanc Explorer the queries are sent with asterisks, we had to change it to empty strings so that the queries came back with any answer, namely we changed :
'Query' : {
      'AccessionNumber' : '*',
      'PatientBirthDate' : '*',
      'PatientID' : '*',
      'PatientName' : '*',
      'PatientSex' : '*',
      'SpecificCharacterSet' : 'ISO_IR 192',  // UTF-8
      'StudyDate' : $('#qr-date').val(),
      'StudyDescription' : '*'
    }

to 
'Query' : {
      'AccessionNumber' : '',
      'PatientBirthDate' : '',
      'PatientID' : '',
      'PatientName' : '',
      'PatientSex' : '',
      'SpecificCharacterSet' : 'ISO_IR 192',  // UTF-8
      'StudyDate' : $('#qr-date').val(),
      'StudyDescription' : ''
    }

in query-retrieve.js.
Comment 3 Sébastien Jodogne 2020-06-29 15:19:17 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2016-10-14.07:16:48]

This question on the Orthanc Users discussion group might be closely related: https://groups.google.com/d/msg/orthanc-users/3g7V7kqr3g0/IREL88RWAwAJ
Comment 4 Sébastien Jodogne 2020-06-29 15:19:27 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2016-12-13.09:40:00]

The "OutgoingFindRequestFilter()" Lua callback introduced in Orthanc 1.2.0 allows to fix this issue.
https://groups.google.com/d/msg/orthanc-users/3g7V7kqr3g0/3Aiu86CnDwAJ