diff OrthancServer/OrthancExplorer/explorer.js @ 4760:b2417ac5055a openssl-3.x

integration mainline->openssl-3.x
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 21 Jul 2021 10:48:14 +0200
parents 56ed4c11fc2a 72a850947b11
children 70d2a97ca8cb
line wrap: on
line diff
--- a/OrthancServer/OrthancExplorer/explorer.js	Thu Jul 08 14:58:18 2021 +0200
+++ b/OrthancServer/OrthancExplorer/explorer.js	Wed Jul 21 10:48:14 2021 +0200
@@ -494,23 +494,39 @@
   target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days'));
   target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months'));
   target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year'));
+  target.append($('<option>').attr('value', 'specific').text('Specific date'));
   target.selectmenu('refresh');
 
   $('#lookup-result').hide();
+  $('#lookup-study-date-specific').hide();
+});
+
+
+$('#lookup-study-date').live('change', function() {
+  if ($(this).val() == 'specific') {
+    $('#lookup-study-date-specific').show();
+  } else {
+    $('#lookup-study-date-specific').hide();
+  }
 });
 
 
 $('#lookup-submit').live('click', function() {
-  var lookup;
+  var lookup, studyDate;
 
   $('#lookup-result').hide();
 
+  studyDate = $('#lookup-study-date').val();
+  if (studyDate == 'specific') {
+    studyDate = IsoToDicomDate($('#lookup-study-date-specific').val());
+  }
+  
   lookup = {
     'Level' : 'Study',
     'Expand' : true,
     'Limit' : LIMIT_RESOURCES + 1,
     'Query' : {
-      'StudyDate' : $('#lookup-study-date').val()
+      'StudyDate' : studyDate
     },
     'Full' : true
   };
@@ -529,6 +545,9 @@
       else if (input.id == 'lookup-study-description') {
         lookup['Query']['StudyDescription'] = input.value;
       }
+      else if (input.id == 'lookup-study-date-specific') {
+        // Ignore
+      }
       else {
         console.error('Unknown lookup field: ' + input.id);
       }