Mercurial > hg > orthanc
annotate OrthancServer/OrthancExplorer/query-retrieve.js @ 4669:b14989f9ff8b
fix misleading log message about unknown transfer syntax in C-GET SCP
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 28 May 2021 11:40:47 +0200 |
parents | 8661811abca3 |
children | f0038043fb97 72a850947b11 |
rev | line source |
---|---|
4122
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
1 /** |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4122
diff
changeset
|
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium |
4122
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
6 * |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
8 * modify it under the terms of the GNU General Public License as |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
9 * published by the Free Software Foundation, either version 3 of the |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
10 * License, or (at your option) any later version. |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
11 * |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
12 * In addition, as a special exception, the copyright holders of this |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
13 * program give permission to link the code of its release with the |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
15 * that use the same license as the "OpenSSL" library), and distribute |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
16 * the linked executables. You must obey the GNU General Public License |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
17 * in all respects for all of the code used other than "OpenSSL". If you |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
18 * modify file(s) with this exception, you may extend this exception to |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
19 * your version of the file(s), but you are not obligated to do so. If |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
20 * you do not wish to do so, delete this exception statement from your |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
21 * version. If you delete this exception statement from all source files |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
22 * in the program, then also delete it here. |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
23 * |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
24 * This program is distributed in the hope that it will be useful, but |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
25 * WITHOUT ANY WARRANTY; without even the implied warranty of |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
27 * General Public License for more details. |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
28 * |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
29 * You should have received a copy of the GNU General Public License |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
31 **/ |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
32 |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
33 |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
34 function GenerateDicomDate(days) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
35 { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
36 var today = new Date(); |
4610
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
37 var utc = new Date(today); |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
38 utc.setDate(today.getDate() + days); |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
39 |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
40 /** |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
41 * "utc" contains the date of interest, as selected by the user. |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
42 * Calling "utc.toISOString()" would return a date in the UTC |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
43 * timezone, whereas the user expects the date to be expressed in |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
44 * her own timezone. We thus adjust from UTC to the local timezome. |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
45 * https://stackoverflow.com/a/50537435 |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
46 * https://groups.google.com/g/orthanc-users/c/dK7EEPVpedk/m/DPtMRFnKAgAJ |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
47 **/ |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
48 var timezoneOffset = today.getTimezoneOffset() * 60 * 1000; |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
49 var localDate = new Date(utc.getTime() - timezoneOffset); |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
50 |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
51 var s = localDate.toISOString(); |
8661811abca3
Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
52 return s.substring(0, 4) + s.substring(5, 7) + s.substring(8, 10); |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
53 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
54 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
55 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
56 $('#query-retrieve').live('pagebeforeshow', function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
57 var targetDate; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
58 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
59 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
60 url: '../modalities', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
61 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
62 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
63 cache: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
64 success: function(modalities) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
65 var targetServer = $('#qr-server'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
66 var option; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
67 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
68 $('option', targetServer).remove(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
69 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
70 for (var i = 0; i < modalities.length; i++) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
71 option = $('<option>').text(modalities[i]); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
72 targetServer.append(option); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
73 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
74 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
75 targetServer.selectmenu('refresh'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
76 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
77 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
78 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
79 targetDate = $('#qr-date'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
80 $('option', targetDate).remove(); |
3792
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
81 targetDate.append($('<option>').attr('value', '').text('Any date')); |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
82 targetDate.append($('<option>').attr('value', GenerateDicomDate(0)).text('Today')); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
83 targetDate.append($('<option>').attr('value', GenerateDicomDate(-1)).text('Yesterday')); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
84 targetDate.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days')); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
85 targetDate.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days')); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
86 targetDate.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months')); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
87 targetDate.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year')); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
88 targetDate.selectmenu('refresh'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
89 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
90 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
91 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
92 $('#qr-echo').live('click', function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
93 var server = $('#qr-server').val(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
94 var message = 'Error: The C-Echo has failed!'; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
95 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
96 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
97 url: '../modalities/' + server + '/echo', |
4088
ce7709cb380e
Fix issue #183 (C-ECHO always fails in Orthanc Explorer, regression from 1.6.1 to 1.7.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3792
diff
changeset
|
98 data: '{}', // Fix for issue #183 (regression from Orthanc 1.6.1 to 1.7.0) |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
99 type: 'POST', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
100 cache: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
101 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
102 success: function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
103 message = 'The C-Echo has succeeded!'; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
104 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
105 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
106 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
107 $('<div>').simpledialog2({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
108 mode: 'button', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
109 headerText: 'Echo result', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
110 headerClose: true, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
111 buttonPrompt: message, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
112 animate: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
113 buttons : { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
114 'OK': { click: function () { } } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
115 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
116 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
117 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
118 return false; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
119 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
120 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
121 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
122 $('#qr-submit').live('click', function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
123 var query, server, modalities, field; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
124 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
125 query = { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
126 'Level' : 'Study', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
127 'Query' : { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
128 'AccessionNumber' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
129 'PatientBirthDate' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
130 'PatientID' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
131 'PatientName' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
132 'PatientSex' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
133 'StudyDate' : $('#qr-date').val(), |
3792
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
134 'StudyDescription' : '' |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
135 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
136 }; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
137 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
138 modalities = ''; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
139 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
140 field = $('#qr-fields input:checked').val(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
141 query['Query'][field] = $('#qr-value').val().toUpperCase(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
142 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
143 $('#qr-modalities input:checked').each(function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
144 var s = $(this).attr('name'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
145 if (modalities == '') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
146 modalities = s; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
147 else |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
148 modalities += '\\' + s; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
149 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
150 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
151 if (modalities.length > 0) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
152 query['Query']['ModalitiesInStudy'] = modalities; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
153 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
154 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
155 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
156 server = $('#qr-server').val(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
157 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
158 url: '../modalities/' + server + '/query', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
159 type: 'POST', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
160 data: JSON.stringify(query), |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
161 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
162 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
163 error: function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
164 alert('Error during query (C-Find)'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
165 }, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
166 success: function(result) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
167 ChangePage('query-retrieve-2', { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
168 'server' : server, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
169 'uuid' : result['ID'] |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
170 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
171 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
172 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
173 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
174 return false; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
175 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
176 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
177 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
178 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
179 $('#query-retrieve-2').live('pagebeforeshow', function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
180 var pageData, uri; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
181 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
182 if ($.mobile.pageData) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
183 pageData = DeepCopy($.mobile.pageData); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
184 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
185 uri = '../queries/' + pageData.uuid + '/answers'; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
186 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
187 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
188 url: uri, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
189 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
190 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
191 success: function(answers) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
192 var target = $('#query-retrieve-2 ul'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
193 $('li', target).remove(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
194 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
195 for (var i = 0; i < answers.length; i++) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
196 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
197 url: uri + '/' + answers[i] + '/content?simplify', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
198 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
199 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
200 success: function(study) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
201 var series = '#query-retrieve-3?server=' + pageData.server + '&uuid=' + study['StudyInstanceUID']; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
202 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
203 var content = ($('<div>') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
204 .append($('<h3>').text(study['PatientID'] + ' - ' + study['PatientName'])) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
205 .append($('<p>').text('Accession number: ') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
206 .append($('<b>').text(study['AccessionNumber']))) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
207 .append($('<p>').text('Birth date: ') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
208 .append($('<b>').text(study['PatientBirthDate']))) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
209 .append($('<p>').text('Patient sex: ') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
210 .append($('<b>').text(study['PatientSex']))) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
211 .append($('<p>').text('Study description: ') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
212 .append($('<b>').text(study['StudyDescription']))) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
213 .append($('<p>').text('Study date: ') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
214 .append($('<b>').text(FormatDicomDate(study['StudyDate']))))); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
215 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
216 var info = $('<a>').attr('href', series).html(content); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
217 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
218 var answerId = answers[i]; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
219 var retrieve = $('<a>').text('Retrieve all study').click(function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
220 ChangePage('query-retrieve-4', { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
221 'query' : pageData.uuid, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
222 'answer' : answerId, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
223 'server' : pageData.server |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
224 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
225 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
226 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
227 target.append($('<li>').append(info).append(retrieve)); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
228 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
229 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
230 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
231 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
232 target.listview('refresh'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
233 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
234 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
235 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
236 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
237 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
238 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
239 $('#query-retrieve-3').live('pagebeforeshow', function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
240 var pageData, query; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
241 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
242 if ($.mobile.pageData) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
243 pageData = DeepCopy($.mobile.pageData); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
244 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
245 query = { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
246 'Level' : 'Series', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
247 'Query' : { |
3792
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
248 'Modality' : '', |
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
249 'ProtocolName' : '', |
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
250 'SeriesDescription' : '', |
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
251 'SeriesInstanceUID' : '', |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
252 'StudyInstanceUID' : pageData.uuid |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
253 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
254 }; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
255 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
256 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
257 url: '../modalities/' + pageData.server + '/query', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
258 type: 'POST', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
259 data: JSON.stringify(query), |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
260 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
261 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
262 error: function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
263 alert('Error during query (C-Find)'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
264 }, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
265 success: function(answer) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
266 var queryUuid = answer['ID']; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
267 var uri = '../queries/' + answer['ID'] + '/answers'; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
268 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
269 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
270 url: uri, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
271 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
272 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
273 success: function(answers) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
274 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
275 var target = $('#query-retrieve-3 ul'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
276 $('li', target).remove(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
277 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
278 for (var i = 0; i < answers.length; i++) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
279 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
280 url: uri + '/' + answers[i] + '/content?simplify', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
281 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
282 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
283 success: function(series) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
284 var content = ($('<div>') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
285 .append($('<h3>').text(series['SeriesDescription'])) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
286 .append($('<p>').text('Modality: ') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
287 .append($('<b>').text(series['Modality']))) |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
288 .append($('<p>').text('ProtocolName: ') |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
289 .append($('<b>').text(series['ProtocolName'])))); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
290 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
291 var info = $('<a>').html(content); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
292 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
293 var answerId = answers[i]; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
294 info.click(function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
295 ChangePage('query-retrieve-4', { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
296 'query' : queryUuid, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
297 'study' : pageData.uuid, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
298 'answer' : answerId, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
299 'server' : pageData.server |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
300 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
301 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
302 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
303 target.append($('<li>').attr('data-icon', 'arrow-d').append(info)); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
304 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
305 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
306 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
307 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
308 target.listview('refresh'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
309 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
310 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
311 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
312 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
313 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
314 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
315 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
316 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
317 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
318 $('#query-retrieve-4').live('pagebeforeshow', function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
319 var pageData, uri; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
320 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
321 if ($.mobile.pageData) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
322 var pageData = DeepCopy($.mobile.pageData); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
323 var uri = '../queries/' + pageData.query + '/answers/' + pageData.answer + '/retrieve'; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
324 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
325 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
326 url: '../system', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
327 dataType: 'json', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
328 async: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
329 cache: false, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
330 success: function(system) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
331 $('#retrieve-target').val(system['DicomAet']); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
332 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
333 $('#retrieve-form').submit(function(event) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
334 var aet; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
335 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
336 event.preventDefault(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
337 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
338 aet = $('#retrieve-target').val(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
339 if (aet.length == 0) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
340 aet = system['DicomAet']; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
341 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
342 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
343 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
344 url: uri, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
345 type: 'POST', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
346 async: true, // Necessary to block UI |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
347 dataType: 'text', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
348 data: aet, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
349 beforeSend: function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
350 $.blockUI({ message: $('#info-retrieve') }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
351 }, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
352 complete: function(s) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
353 $.unblockUI(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
354 }, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
355 success: function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
356 if (pageData.study) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
357 // Go back to the list of series |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
358 ChangePage('query-retrieve-3', { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
359 'server' : pageData.server, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
360 'uuid' : pageData.study |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
361 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
362 } else { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
363 // Go back to the list of studies |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
364 ChangePage('query-retrieve-2', { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
365 'server' : pageData.server, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
366 'uuid' : pageData.query |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
367 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
368 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
369 }, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
370 error: function() { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
371 alert('Error during retrieve'); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
372 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
373 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
374 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
375 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
376 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
377 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
378 }); |