Mercurial > hg > orthanc
annotate OrthancExplorer/query-retrieve.js @ 1492:9f66a12eb8fc
fix warnings for gcc 5
author | jodogne |
---|---|
date | Tue, 04 Aug 2015 14:47:35 +0200 |
parents | 21a2929e541d |
children | aaf368280f5a |
rev | line source |
---|---|
1371
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 function JavascriptDateToDicom(date) |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 var s = date.toISOString(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 return s.substring(0, 4) + s.substring(5, 7) + s.substring(8, 10); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 function GenerateDicomDate(days) |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 var today = new Date(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 var other = new Date(today); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 other.setDate(today.getDate() + days); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 return JavascriptDateToDicom(other); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 $('#query-retrieve').live('pagebeforeshow', function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 url: '../modalities', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 cache: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 success: function(modalities) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 var target = $('#qr-server'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 $('option', target).remove(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 for (var i = 0; i < modalities.length; i++) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 var option = $('<option>').text(modalities[i]); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 target.append(option); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 target.selectmenu('refresh'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 var target = $('#qr-date'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 $('option', target).remove(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 target.append($('<option>').attr('value', '*').text('Any date')); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 target.append($('<option>').attr('value', GenerateDicomDate(0)).text('Today')); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 target.append($('<option>').attr('value', GenerateDicomDate(-1)).text('Yesterday')); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 target.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days')); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days')); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months')); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year')); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 target.selectmenu('refresh'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 $('#qr-submit').live('click', function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 var query = { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 'Level' : 'Study', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 'Query' : { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 'AccessionNumber' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 'PatientBirthDate' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 'PatientID' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 'PatientName' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 'PatientSex' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 'SpecificCharacterSet' : 'ISO_IR 192', // UTF-8 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 'StudyDate' : $('#qr-date').val(), |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 'StudyDescription' : '*' |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 }; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 var field = $('#qr-fields input:checked').val(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 query['Query'][field] = $('#qr-value').val().toUpperCase(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 var modalities = ''; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 $('#qr-modalities input:checked').each(function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 var s = $(this).attr('name'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 if (modalities == '*') |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 modalities = s; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 else |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 modalities += '\\' + s; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 if (modalities.length > 0) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 query['Query']['ModalitiesInStudy'] = modalities; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 var server = $('#qr-server').val(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 url: '../modalities/' + server + '/query', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 type: 'POST', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 data: JSON.stringify(query), |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 error: function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 alert('Error during query (C-Find)'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 }, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 success: function(result) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 window.location.assign('explorer.html#query-retrieve-2?server=' + server + '&uuid=' + result['ID']); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 return false; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 function Retrieve(url) |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 url: '../system', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 success: function(system) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 $('<div>').simpledialog2({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 mode: 'button', |
1373
21a2929e541d
Move SCU conformance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1371
diff
changeset
|
109 headerText: 'Target', |
1371
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 headerClose: true, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 buttonPrompt: 'Enter Application Entity Title (AET):', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 buttonInput: true, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 buttonInputDefault: system['DicomAet'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 buttons : { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 'OK': { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 click: function () { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 var aet = $.mobile.sdLastInput; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 if (aet.length == 0) |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 aet = system['DicomAet']; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 url: url, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 type: 'POST', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 async: true, // Necessary to block UI |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 dataType: 'text', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 data: aet, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 beforeSend: function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 $.blockUI({ message: $('#info-retrieve') }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 }, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 complete: function(s) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 $.unblockUI(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 }, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 error: function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 alert('Error during retrieve'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 $('#query-retrieve-2').live('pagebeforeshow', function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 if ($.mobile.pageData) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 var uri = '../queries/' + $.mobile.pageData.uuid + '/answers'; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 url: uri, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 success: function(answers) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 var target = $('#query-retrieve-2 ul'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 $('li', target).remove(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 for (var i = 0; i < answers.length; i++) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 url: uri + '/' + answers[i] + '/content?simplify', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 success: function(study) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
166 var series = '#query-retrieve-3?server=' + $.mobile.pageData.server + '&uuid=' + study['StudyInstanceUID']; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
167 var info = $('<a>').attr('href', series).html( |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 ('<h3>{0} - {1}</h3>' + |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 '<p>Accession number: <b>{2}</b></p>' + |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 '<p>Birth date: <b>{3}</b></p>' + |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 '<p>Patient sex: <b>{4}</b></p>' + |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 '<p>Study description: <b>{5}</b></p>' + |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 '<p>Study date: <b>{6}</b></p>').format( |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 study['PatientID'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 study['PatientName'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 study['AccessionNumber'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 FormatDicomDate(study['PatientBirthDate']), |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
178 study['PatientSex'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
179 study['StudyDescription'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 FormatDicomDate(study['StudyDate']))); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
182 var studyUri = uri + '/' + answers[i] + '/retrieve'; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 var retrieve = $('<a>').text('Retrieve').click(function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 Retrieve(studyUri); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 target.append($('<li>').append(info).append(retrieve)); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 target.listview('refresh'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
198 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
199 $('#query-retrieve-3').live('pagebeforeshow', function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 if ($.mobile.pageData) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 var query = { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 'Level' : 'Series', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
203 'Query' : { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
204 'Modality' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
205 'ProtocolName' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
206 'SeriesDescription' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 'SeriesInstanceUID' : '*', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
208 'StudyInstanceUID' : $.mobile.pageData.uuid |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
209 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 }; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
211 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
212 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
213 url: '../modalities/' + $.mobile.pageData.server + '/query', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
214 type: 'POST', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
215 data: JSON.stringify(query), |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
216 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
217 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
218 error: function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 alert('Error during query (C-Find)'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
220 }, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
221 success: function(answer) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
222 var uri = '../queries/' + answer['ID'] + '/answers'; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
223 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
224 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
225 url: uri, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
226 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
227 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
228 success: function(answers) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
229 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
230 var target = $('#query-retrieve-3 ul'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
231 $('li', target).remove(); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
232 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
233 for (var i = 0; i < answers.length; i++) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
234 $.ajax({ |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
235 url: uri + '/' + answers[i] + '/content?simplify', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
236 dataType: 'json', |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
237 async: false, |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
238 success: function(series) { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
239 var info = $('<a>').html( |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
240 ('<h3>{0}</h3>' + |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
241 '<p>Modality: <b>{1}</b></p>' + |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
242 '<p>Protocol name: <b>{2}</b></p>' |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
243 ).format( |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
244 series['SeriesDescription'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
245 series['Modality'], |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
246 series['ProtocolName'] |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
247 )); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
248 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
249 var seriesUri = uri + '/' + answers[i] + '/retrieve'; |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
250 var retrieve = $('<a>').text('Retrieve').click(function() { |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
251 Retrieve(seriesUri); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
252 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
253 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
254 target.append($('<li>').append(info).append(retrieve)); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
255 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
256 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
257 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
258 |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
259 target.listview('refresh'); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
260 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
261 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
262 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
263 }); |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
264 } |
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
265 }); |