changeset 3792:6dba4fa8a6cb

remove universal wildcard on StudyDate in OrthancExplorer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 26 Mar 2020 07:19:30 +0100
parents a22717e68d9b
children b452caa573d6
files OrthancExplorer/explorer.js OrthancExplorer/query-retrieve.js OrthancServer/Search/DicomTagConstraint.cpp
diffstat 3 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancExplorer/explorer.js	Wed Mar 25 18:44:17 2020 +0100
+++ b/OrthancExplorer/explorer.js	Thu Mar 26 07:19:30 2020 +0100
@@ -431,7 +431,7 @@
   // NB: "GenerateDicomDate()" is defined in "query-retrieve.js"
   var target = $('#lookup-study-date');
   $('option', target).remove();
-  target.append($('<option>').attr('value', '*').text('Any date'));
+  target.append($('<option>').attr('value', '').text('Any date'));
   target.append($('<option>').attr('value', GenerateDicomDate(0)).text('Today'));
   target.append($('<option>').attr('value', GenerateDicomDate(-1)).text('Yesterday'));
   target.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days'));
--- a/OrthancExplorer/query-retrieve.js	Wed Mar 25 18:44:17 2020 +0100
+++ b/OrthancExplorer/query-retrieve.js	Thu Mar 26 07:19:30 2020 +0100
@@ -38,7 +38,7 @@
 
   targetDate = $('#qr-date');
   $('option', targetDate).remove();
-  targetDate.append($('<option>').attr('value', '*').text('Any date'));
+  targetDate.append($('<option>').attr('value', '').text('Any date'));
   targetDate.append($('<option>').attr('value', GenerateDicomDate(0)).text('Today'));
   targetDate.append($('<option>').attr('value', GenerateDicomDate(-1)).text('Yesterday'));
   targetDate.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days'));
@@ -90,7 +90,7 @@
       'PatientName' : '',
       'PatientSex' : '',
       'StudyDate' : $('#qr-date').val(),
-      'StudyDescription' : '*'
+      'StudyDescription' : ''
     }
   };
 
@@ -204,10 +204,10 @@
     query = {
       'Level' : 'Series',
       'Query' : {
-        'Modality' : '*',
-        'ProtocolName' : '*',
-        'SeriesDescription' : '*',
-        'SeriesInstanceUID' : '*',
+        'Modality' : '',
+        'ProtocolName' : '',
+        'SeriesDescription' : '',
+        'SeriesInstanceUID' : '',
         'StudyInstanceUID' : pageData.uuid
       }
     };
--- a/OrthancServer/Search/DicomTagConstraint.cpp	Wed Mar 25 18:44:17 2020 +0100
+++ b/OrthancServer/Search/DicomTagConstraint.cpp	Thu Mar 26 07:19:30 2020 +0100
@@ -105,7 +105,8 @@
         (value.find('*') != std::string::npos ||
          value.find('?') != std::string::npos))
     {
-      throw OrthancException(ErrorCode_ParameterOutOfRange);
+      throw OrthancException(ErrorCode_ParameterOutOfRange,
+                             "Wildcards are not allowed on tag " + tag_.Format());
     }
 
     if (constraintType_ == ConstraintType_Equal ||