annotate OrthancExplorer/query-retrieve.js @ 2147:8466aa60544a

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 17:37:47 +0100
parents e0517f25919e
children 3eefb84ac0bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2119
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
1 function JavascriptDateToDicom(date)
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
2 {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
3 var s = date.toISOString();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
4 return s.substring(0, 4) + s.substring(5, 7) + s.substring(8, 10);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
5 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
6
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
7 function GenerateDicomDate(days)
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
8 {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
9 var today = new Date();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
10 var other = new Date(today);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
11 other.setDate(today.getDate() + days);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
12 return JavascriptDateToDicom(other);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
13 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
14
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
15
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
16 $('#query-retrieve').live('pagebeforeshow', function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
17 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
18 url: '../modalities',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
19 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
20 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
21 cache: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
22 success: function(modalities) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
23 var target = $('#qr-server');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
24 $('option', target).remove();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
25
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
26 for (var i = 0; i < modalities.length; i++) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
27 var option = $('<option>').text(modalities[i]);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
28 target.append(option);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
29 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
30
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
31 target.selectmenu('refresh');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
32 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
33 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
34
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
35 var target = $('#qr-date');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
36 $('option', target).remove();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
37 target.append($('<option>').attr('value', '*').text('Any date'));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
38 target.append($('<option>').attr('value', GenerateDicomDate(0)).text('Today'));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
39 target.append($('<option>').attr('value', GenerateDicomDate(-1)).text('Yesterday'));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
40 target.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days'));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
41 target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days'));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
42 target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months'));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
43 target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year'));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
44 target.selectmenu('refresh');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
45 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
46
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
47
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
48 $('#qr-echo').live('click', function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
49 var server = $('#qr-server').val();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
50 var message = 'Error: The C-Echo has failed!';
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
51
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
52 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
53 url: '../modalities/' + server + '/echo',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
54 type: 'POST',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
55 cache: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
56 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
57 success: function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
58 message = 'The C-Echo has succeeded!';
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
59 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
60 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
61
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
62 $('<div>').simpledialog2({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
63 mode: 'button',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
64 headerText: 'Echo result',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
65 headerClose: true,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
66 buttonPrompt: message,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
67 animate: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
68 buttons : {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
69 'OK': { click: function () { } }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
70 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
71 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
72
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
73 return false;
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
74 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
75
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
76
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
77 $('#qr-submit').live('click', function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
78 var query = {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
79 'Level' : 'Study',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
80 'Query' : {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
81 'AccessionNumber' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
82 'PatientBirthDate' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
83 'PatientID' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
84 'PatientName' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
85 'PatientSex' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
86 'SpecificCharacterSet' : 'ISO_IR 192', // UTF-8
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
87 'StudyDate' : $('#qr-date').val(),
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
88 'StudyDescription' : '*'
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
89 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
90 };
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
91
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
92 var field = $('#qr-fields input:checked').val();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
93 query['Query'][field] = $('#qr-value').val().toUpperCase();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
94
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
95 var modalities = '';
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
96 $('#qr-modalities input:checked').each(function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
97 var s = $(this).attr('name');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
98 if (modalities == '*')
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
99 modalities = s;
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
100 else
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
101 modalities += '\\' + s;
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
102 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
103
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
104 if (modalities.length > 0) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
105 query['Query']['ModalitiesInStudy'] = modalities;
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
106 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
107
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
108
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
109 var server = $('#qr-server').val();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
110 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
111 url: '../modalities/' + server + '/query',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
112 type: 'POST',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
113 data: JSON.stringify(query),
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
114 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
115 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
116 error: function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
117 alert('Error during query (C-Find)');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
118 },
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
119 success: function(result) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
120 ChangePage('query-retrieve-2', {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
121 'server' : server,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
122 'uuid' : result['ID']
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
123 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
124 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
125 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
126
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
127 return false;
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
128 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
129
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
130
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
131
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
132 $('#query-retrieve-2').live('pagebeforeshow', function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
133 if ($.mobile.pageData) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
134 var pageData = DeepCopy($.mobile.pageData);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
135
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
136 var uri = '../queries/' + pageData.uuid + '/answers';
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
137
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
138 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
139 url: uri,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
140 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
141 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
142 success: function(answers) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
143 var target = $('#query-retrieve-2 ul');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
144 $('li', target).remove();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
145
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
146 for (var i = 0; i < answers.length; i++) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
147 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
148 url: uri + '/' + answers[i] + '/content?simplify',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
149 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
150 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
151 success: function(study) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
152 var series = '#query-retrieve-3?server=' + pageData.server + '&uuid=' + study['StudyInstanceUID'];
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
153 var info = $('<a>').attr('href', series).html(
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
154 ('<h3>{0} - {1}</h3>' +
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
155 '<p>Accession number: <b>{2}</b></p>' +
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
156 '<p>Birth date: <b>{3}</b></p>' +
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
157 '<p>Patient sex: <b>{4}</b></p>' +
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
158 '<p>Study description: <b>{5}</b></p>' +
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
159 '<p>Study date: <b>{6}</b></p>').format(
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
160 study['PatientID'],
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
161 study['PatientName'],
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
162 study['AccessionNumber'],
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
163 FormatDicomDate(study['PatientBirthDate']),
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
164 study['PatientSex'],
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
165 study['StudyDescription'],
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
166 FormatDicomDate(study['StudyDate'])));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
167
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
168 var answerId = answers[i];
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
169 var retrieve = $('<a>').text('Retrieve all study').click(function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
170 ChangePage('query-retrieve-4', {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
171 'query' : pageData.uuid,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
172 'answer' : answerId,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
173 'server' : pageData.server
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
174 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
175 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
176
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
177 target.append($('<li>').append(info).append(retrieve));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
178 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
179 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
180 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
181
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
182 target.listview('refresh');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
183 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
184 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
185 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
186 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
187
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
188
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
189 $('#query-retrieve-3').live('pagebeforeshow', function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
190 if ($.mobile.pageData) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
191 var pageData = DeepCopy($.mobile.pageData);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
192
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
193 var query = {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
194 'Level' : 'Series',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
195 'Query' : {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
196 'Modality' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
197 'ProtocolName' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
198 'SeriesDescription' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
199 'SeriesInstanceUID' : '*',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
200 'StudyInstanceUID' : pageData.uuid
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
201 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
202 };
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
203
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
204 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
205 url: '../modalities/' + pageData.server + '/query',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
206 type: 'POST',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
207 data: JSON.stringify(query),
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
208 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
209 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
210 error: function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
211 alert('Error during query (C-Find)');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
212 },
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
213 success: function(answer) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
214 var queryUuid = answer['ID'];
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
215 var uri = '../queries/' + answer['ID'] + '/answers';
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
216
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
217 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
218 url: uri,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
219 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
220 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
221 success: function(answers) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
222
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
223 var target = $('#query-retrieve-3 ul');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
224 $('li', target).remove();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
225
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
226 for (var i = 0; i < answers.length; i++) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
227 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
228 url: uri + '/' + answers[i] + '/content?simplify',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
229 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
230 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
231 success: function(series) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
232 var info = $('<a>').html(
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
233 ('<h3>{0}</h3>' +
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
234 '<p>Modality: <b>{1}</b></p>' +
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
235 '<p>Protocol name: <b>{2}</b></p>'
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
236 ).format(
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
237 series['SeriesDescription'],
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
238 series['Modality'],
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
239 series['ProtocolName']
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
240 ));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
241
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
242 var answerId = answers[i];
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
243 info.click(function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
244 ChangePage('query-retrieve-4', {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
245 'query' : queryUuid,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
246 'study' : pageData.uuid,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
247 'answer' : answerId,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
248 'server' : pageData.server
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
249 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
250 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
251
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
252 target.append($('<li>').attr('data-icon', 'arrow-d').append(info));
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
253 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
254 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
255 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
256
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
257 target.listview('refresh');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
258 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
259 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
260 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
261 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
262 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
263 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
264
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
265
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
266
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
267 $('#query-retrieve-4').live('pagebeforeshow', function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
268 if ($.mobile.pageData) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
269 var pageData = DeepCopy($.mobile.pageData);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
270 var uri = '../queries/' + pageData.query + '/answers/' + pageData.answer + '/retrieve';
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
271
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
272 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
273 url: '../system',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
274 dataType: 'json',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
275 async: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
276 cache: false,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
277 success: function(system) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
278 $('#retrieve-target').val(system['DicomAet']);
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
279
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
280 $('#retrieve-form').submit(function(event) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
281 event.preventDefault();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
282
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
283 var aet = $('#retrieve-target').val();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
284 if (aet.length == 0) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
285 aet = system['DicomAet'];
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
286 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
287
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
288 $.ajax({
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
289 url: uri,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
290 type: 'POST',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
291 async: true, // Necessary to block UI
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
292 dataType: 'text',
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
293 data: aet,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
294 beforeSend: function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
295 $.blockUI({ message: $('#info-retrieve') });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
296 },
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
297 complete: function(s) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
298 $.unblockUI();
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
299 },
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
300 success: function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
301 if (pageData.study) {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
302 // Go back to the list of series
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
303 ChangePage('query-retrieve-3', {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
304 'server' : pageData.server,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
305 'uuid' : pageData.study
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
306 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
307 } else {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
308 // Go back to the list of studies
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
309 ChangePage('query-retrieve-2', {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
310 'server' : pageData.server,
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
311 'uuid' : pageData.query
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
312 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
313 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
314 },
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
315 error: function() {
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
316 alert('Error during retrieve');
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
317 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
318 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
319 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
320 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
321 });
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
322 }
e0517f25919e Improved robustness of Orthanc Explorer wrt. query/retrieve (maybe fix issue 24)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1501
diff changeset
323 });