comparison 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
comparison
equal deleted inserted replaced
4750:56ed4c11fc2a 4760:b2417ac5055a
492 target.append($('<option>').attr('value', GenerateDicomDate(-1)).text('Yesterday')); 492 target.append($('<option>').attr('value', GenerateDicomDate(-1)).text('Yesterday'));
493 target.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days')); 493 target.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days'));
494 target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days')); 494 target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days'));
495 target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months')); 495 target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months'));
496 target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year')); 496 target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year'));
497 target.append($('<option>').attr('value', 'specific').text('Specific date'));
497 target.selectmenu('refresh'); 498 target.selectmenu('refresh');
498 499
499 $('#lookup-result').hide(); 500 $('#lookup-result').hide();
501 $('#lookup-study-date-specific').hide();
502 });
503
504
505 $('#lookup-study-date').live('change', function() {
506 if ($(this).val() == 'specific') {
507 $('#lookup-study-date-specific').show();
508 } else {
509 $('#lookup-study-date-specific').hide();
510 }
500 }); 511 });
501 512
502 513
503 $('#lookup-submit').live('click', function() { 514 $('#lookup-submit').live('click', function() {
504 var lookup; 515 var lookup, studyDate;
505 516
506 $('#lookup-result').hide(); 517 $('#lookup-result').hide();
507 518
519 studyDate = $('#lookup-study-date').val();
520 if (studyDate == 'specific') {
521 studyDate = IsoToDicomDate($('#lookup-study-date-specific').val());
522 }
523
508 lookup = { 524 lookup = {
509 'Level' : 'Study', 525 'Level' : 'Study',
510 'Expand' : true, 526 'Expand' : true,
511 'Limit' : LIMIT_RESOURCES + 1, 527 'Limit' : LIMIT_RESOURCES + 1,
512 'Query' : { 528 'Query' : {
513 'StudyDate' : $('#lookup-study-date').val() 529 'StudyDate' : studyDate
514 }, 530 },
515 'Full' : true 531 'Full' : true
516 }; 532 };
517 533
518 $('#lookup-form input').each(function(index, input) { 534 $('#lookup-form input').each(function(index, input) {
526 else if (input.id == 'lookup-accession-number') { 542 else if (input.id == 'lookup-accession-number') {
527 lookup['Query']['AccessionNumber'] = input.value; 543 lookup['Query']['AccessionNumber'] = input.value;
528 } 544 }
529 else if (input.id == 'lookup-study-description') { 545 else if (input.id == 'lookup-study-description') {
530 lookup['Query']['StudyDescription'] = input.value; 546 lookup['Query']['StudyDescription'] = input.value;
547 }
548 else if (input.id == 'lookup-study-date-specific') {
549 // Ignore
531 } 550 }
532 else { 551 else {
533 console.error('Unknown lookup field: ' + input.id); 552 console.error('Unknown lookup field: ' + input.id);
534 } 553 }
535 } 554 }