Mercurial > hg > orthanc
annotate OrthancServer/OrthancExplorer/query-retrieve.js @ 5301:f26ed26a7793 am-experimental
merge
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 24 May 2023 08:56:41 +0200 |
parents | 0ea402b4d901 |
children | 48b8dae6dc77 |
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 |
5185
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4122
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
7 * |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
8 * 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
|
9 * 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
|
10 * 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
|
11 * 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
|
12 * |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
13 * 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
|
14 * 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
|
15 * 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
|
16 * General Public License for more details. |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
17 * |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
18 * 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
|
19 * 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
|
20 **/ |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
21 |
4bb7522a63e0
do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4090
diff
changeset
|
22 |
4757
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
23 function IsoToDicomDate(s) |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
24 { |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
25 return s.substring(0, 4) + s.substring(5, 7) + s.substring(8, 10); |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
26 } |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
27 |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
28 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
|
29 { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
30 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
|
31 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
|
32 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
|
33 |
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
|
34 /** |
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
|
35 * "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
|
36 * 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
|
37 * 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
|
38 * 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
|
39 * 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
|
40 * 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
|
41 **/ |
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 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
|
43 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
|
44 |
4757
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
45 return IsoToDicomDate(localDate.toISOString()); |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
46 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
47 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
48 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
49 $('#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
|
50 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
|
51 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
52 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
53 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
|
54 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
|
55 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
|
56 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
|
57 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
|
58 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
|
59 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
|
60 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
61 $('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
|
62 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
63 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
|
64 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
|
65 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
|
66 } |
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 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
|
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 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
71 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
72 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
|
73 $('option', targetDate).remove(); |
3792
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
74 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
|
75 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
|
76 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
|
77 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
|
78 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
|
79 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
|
80 targetDate.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year')); |
4757
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
81 targetDate.append($('<option>').attr('value', 'specific').text('Specific 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.selectmenu('refresh'); |
4757
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
83 |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
84 $('#qr-date-specific').hide(); |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
85 }); |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
86 |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
87 |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
88 $('#qr-date').live('change', function() { |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
89 if ($(this).val() == 'specific') { |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
90 $('#qr-date-specific').show(); |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
91 } else { |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
92 $('#qr-date-specific').hide(); |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
93 } |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
94 }); |
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 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
97 $('#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
|
98 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
|
99 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
|
100 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
101 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
102 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
|
103 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
|
104 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
|
105 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
|
106 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
|
107 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
|
108 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
|
109 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
110 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
111 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
112 $('<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
|
113 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
|
114 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
|
115 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
|
116 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
|
117 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
|
118 buttons : { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
119 '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
|
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 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
123 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
|
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 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
126 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
127 $('#qr-submit').live('click', function() { |
4757
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
128 var query, server, modalities, field, studyDate; |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
129 |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
130 studyDate = $('#qr-date').val(); |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
131 if (studyDate == 'specific') { |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
132 studyDate = IsoToDicomDate($('#qr-date-specific').val()); |
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
133 } |
3373
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
134 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
135 query = { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
136 '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
|
137 'Query' : { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
138 'AccessionNumber' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
139 'PatientBirthDate' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
140 'PatientID' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
141 'PatientName' : '', |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
142 'PatientSex' : '', |
4757
72a850947b11
In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4610
diff
changeset
|
143 'StudyDate' : studyDate, |
3792
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
144 '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
|
145 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
146 }; |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
147 |
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 = ''; |
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 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
|
151 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
|
152 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
153 $('#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
|
154 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
|
155 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
|
156 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
|
157 else |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
158 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
|
159 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
160 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
161 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
|
162 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
|
163 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
164 |
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 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
|
167 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
168 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
|
169 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
|
170 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
|
171 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
|
172 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
|
173 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
|
174 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
|
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 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
|
177 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
|
178 '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
|
179 '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
|
180 }); |
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 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
183 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
184 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
|
185 }); |
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 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
188 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
189 $('#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
|
190 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
|
191 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
192 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
|
193 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
|
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 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
|
196 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
197 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
198 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
|
199 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
|
200 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
|
201 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
|
202 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
|
203 $('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
|
204 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
205 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
|
206 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
207 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
|
208 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
|
209 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
|
210 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
|
211 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
|
212 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
213 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
|
214 .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
|
215 .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
|
216 .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
|
217 .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
|
218 .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
|
219 .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
|
220 .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
|
221 .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
|
222 .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
|
223 .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
|
224 .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
|
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 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
|
227 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
228 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
|
229 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
|
230 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
|
231 '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
|
232 '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
|
233 '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
|
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 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
|
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 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
240 } |
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 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
|
243 } |
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 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
246 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
247 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
248 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
249 $('#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
|
250 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
|
251 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
252 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
|
253 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
|
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 query = { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
256 '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
|
257 'Query' : { |
3792
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
258 'Modality' : '', |
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
259 'ProtocolName' : '', |
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
260 'SeriesDescription' : '', |
6dba4fa8a6cb
remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3373
diff
changeset
|
261 '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
|
262 '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
|
263 } |
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 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
266 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
267 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
|
268 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
|
269 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
|
270 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
|
271 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
|
272 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
|
273 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
|
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 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
|
276 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
|
277 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
|
278 |
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, |
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(answers) { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
284 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
285 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
|
286 $('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
|
287 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
288 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
|
289 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
290 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
|
291 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
|
292 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
|
293 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
|
294 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
|
295 .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
|
296 .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
|
297 .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
|
298 .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
|
299 .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
|
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 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
|
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 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
|
304 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
|
305 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
|
306 '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
|
307 '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
|
308 '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
|
309 '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
|
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 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
|
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 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
|
319 } |
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 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
322 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
323 } |
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 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
326 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
327 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
328 $('#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
|
329 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
|
330 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
331 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
|
332 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
|
333 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
|
334 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
335 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
336 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
|
337 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
|
338 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
|
339 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
|
340 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
|
341 $('#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
|
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 $('#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
|
344 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
|
345 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
346 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
|
347 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
348 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
|
349 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
|
350 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
|
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 |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
353 $.ajax({ |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
354 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
|
355 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
|
356 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
|
357 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
|
358 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
|
359 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
|
360 $.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
|
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 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
|
363 $.unblockUI(); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
364 }, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
365 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
|
366 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
|
367 // 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
|
368 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
|
369 '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
|
370 '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
|
371 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
372 } else { |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
373 // 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
|
374 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
|
375 '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
|
376 '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
|
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 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
379 }, |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
380 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
|
381 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
|
382 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
383 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
384 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
385 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
386 }); |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
387 } |
4a8e8a96b233
Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents:
3310
diff
changeset
|
388 }); |