annotate OrthancServer/OrthancExplorer/query-retrieve.js @ 5640:f7adfb22e20e

updated copyright, as Orthanc Team now replaces Osimis
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 May 2024 21:19:57 +0200
parents 48b8dae6dc77
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
5640
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
5485
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4122
4bb7522a63e0 do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4090
diff changeset
8 *
4bb7522a63e0 do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4090
diff changeset
9 * 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
10 * 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
11 * 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
12 * 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
13 *
4bb7522a63e0 do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4090
diff changeset
14 * 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
15 * 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
16 * 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
17 * General Public License for more details.
4bb7522a63e0 do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4090
diff changeset
18 *
4bb7522a63e0 do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4090
diff changeset
19 * 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
20 * 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
21 **/
4bb7522a63e0 do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4090
diff changeset
22
4bb7522a63e0 do not enforce openssl exception in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4090
diff changeset
23
4757
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
24 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
25 {
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
26 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
27 }
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
28
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
29 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
30 {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
31 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
32 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
33 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
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 /**
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 * "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
37 * 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
38 * 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
39 * 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
40 * 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
41 * 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
42 **/
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 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
44 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
45
4757
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
46 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
50 $('#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
51 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
52
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
53 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
54 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
55 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
56 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
57 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
58 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
59 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
60 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
61
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
62 $('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
63
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
64 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
65 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
66 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
69 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
73 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
74 $('option', targetDate).remove();
3792
6dba4fa8a6cb remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3373
diff changeset
75 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
76 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
77 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
78 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
79 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
80 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
81 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
82 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
83 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
84
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
85 $('#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
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
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
89 $('#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
90 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
91 $('#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
92 } else {
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
93 $('#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
94 }
3373
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
98 $('#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
99 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
100 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
101
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
102 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
103 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
104 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
105 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
106 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
107 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
108 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
109 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
113 $('<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
114 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
115 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
116 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
117 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
118 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
119 buttons : {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
120 '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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
124 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
128 $('#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
129 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
130
72a850947b11 In lookup and query/retrieve, possibility to provide a specific study date
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4610
diff changeset
131 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
132 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
133 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
134 }
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 query = {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
137 '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
138 'Query' : {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
139 'AccessionNumber' : '',
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
140 'PatientBirthDate' : '',
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
141 'PatientID' : '',
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
142 'PatientName' : '',
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
143 '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
144 'StudyDate' : studyDate,
3792
6dba4fa8a6cb remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3373
diff changeset
145 '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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
149 modalities = '';
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 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
152 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
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 $('#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
155 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
156 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
157 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
158 else
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
159 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
162 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
163 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
167 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
168 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
169 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
170 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
171 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
172 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
173 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
174 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
175 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
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 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
178 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
179 '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
180 '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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
185 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
190 $('#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
191 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
192
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
193 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
194 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
195
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
196 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
197
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
198 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
199 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
200 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
201 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
202 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
203 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
204 $('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
205
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
206 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
207 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
208 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
209 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
210 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
211 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
212 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
213
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
214 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
215 .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
216 .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
217 .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
218 .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
219 .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
220 .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
221 .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
222 .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
223 .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
224 .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
225 .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
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 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
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 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
230 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
231 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
232 '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
233 '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
234 '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
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 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
243 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
250 $('#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
251 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
252
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
253 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
254 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
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 query = {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
257 '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
258 'Query' : {
3792
6dba4fa8a6cb remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3373
diff changeset
259 'Modality' : '',
6dba4fa8a6cb remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3373
diff changeset
260 'ProtocolName' : '',
6dba4fa8a6cb remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3373
diff changeset
261 'SeriesDescription' : '',
6dba4fa8a6cb remove universal wildcard on StudyDate in OrthancExplorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3373
diff changeset
262 '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
263 '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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
267 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
268 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
269 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
270 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
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 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
274 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
275 },
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
276 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
277 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
278 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
279
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
280 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
281 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
282 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
283 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
284 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
285
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
286 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
287 $('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
288
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
289 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
290 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
291 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
292 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
293 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
294 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
295 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
296 .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
297 .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
298 .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
299 .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
300 .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
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 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
303
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
304 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
305 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
306 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
307 '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
308 '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
309 '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
310 '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
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 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
319 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
329 $('#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
330 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
331
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
332 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
333 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
334 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
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 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
337 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
338 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
339 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
340 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
341 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
342 $('#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
343
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
344 $('#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
345 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
346
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
347 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
348
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
349 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
350 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
351 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
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
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
354 $.ajax({
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
355 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
356 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
357 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
358 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
359 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
360 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
361 $.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
362 },
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
363 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
364 $.unblockUI();
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
365 },
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
366 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
367 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
368 // 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
369 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
370 '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
371 '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
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 } else {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
374 // 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
375 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
376 '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
377 '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
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 },
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
381 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
382 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
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 }
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 3310
diff changeset
389 });