Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/Compatibility/GenericFind.cpp @ 5592:1e2631b8b9af find-refactoring
GenericFind::Execute() is working for a basic request
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 May 2024 21:26:06 +0200 |
parents | 8b32213af23e |
children | 862b54b4cfe2 |
rev | line source |
---|---|
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * modify it under the terms of the GNU General Public License as |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * published by the Free Software Foundation, either version 3 of the |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * License, or (at your option) any later version. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * General Public License for more details. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 **/ |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 #include "GenericFind.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
5592
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
25 #include "../../../../OrthancFramework/Sources/DicomFormat/DicomArray.h" |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 #include "../../../../OrthancFramework/Sources/OrthancException.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 namespace Orthanc |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 namespace Compatibility |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 void GenericFind::Execute(FindResponse& response, |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 const FindRequest& request) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 { |
5590
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5589
diff
changeset
|
36 if (!request.GetOrthancIdentifiers().HasPatientId() && |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 !request.GetOrthancIdentifiers().HasStudyId() && |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 !request.GetOrthancIdentifiers().HasSeriesId() && |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 !request.GetOrthancIdentifiers().HasInstanceId() && |
5568
b0b5546f1b9f
find refactor: re-use existing code. /studies?expand is almost fully implemented with new code
Alain Mazy <am@orthanc.team>
parents:
5567
diff
changeset
|
40 request.GetDicomTagConstraintsCount() == 0 && |
b0b5546f1b9f
find refactor: re-use existing code. /studies?expand is almost fully implemented with new code
Alain Mazy <am@orthanc.team>
parents:
5567
diff
changeset
|
41 request.GetMetadataConstraintsCount() == 0 && |
5567
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
42 request.GetOrdering().empty() && |
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
43 request.GetLabels().empty()) |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 std::list<std::string> ids; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 if (request.HasLimits()) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 transaction_.GetAllPublicIds(ids, request.GetLevel(), request.GetLimitsSince(), request.GetLimitsCount()); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 else |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 transaction_.GetAllPublicIds(ids, request.GetLevel()); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 for (std::list<std::string>::const_iterator it = ids.begin(); it != ids.end(); ++it) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 { |
5592
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
58 int64_t internalId; |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
59 ResourceType t; |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
60 if (!transaction_.LookupResource(internalId, t, *it) || |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
61 t != request.GetLevel()) |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
62 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
63 throw OrthancException(ErrorCode_InternalError); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
64 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
65 |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
66 std::unique_ptr<FindResponse::Resource> resource(new FindResponse::Resource(request.GetLevel(), *it)); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
67 |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
68 if (request.IsRetrieveMainDicomTags()) |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
69 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
70 DicomMap m; |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
71 transaction_.GetMainDicomTags(m, internalId); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
72 |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
73 DicomArray a(m); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
74 for (size_t i = 0; i < a.GetSize(); i++) |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
75 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
76 const DicomElement& element = a.GetElement(i); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
77 if (element.GetValue().IsString()) |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
78 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
79 resource->AddStringDicomTag(element.GetTag().GetGroup(), element.GetTag().GetElement(), |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
80 element.GetValue().GetContent()); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
81 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
82 else |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
83 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
84 throw OrthancException(ErrorCode_BadParameterType); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
85 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
86 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
87 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
88 |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
89 if (request.IsRetrieveParentIdentifier()) |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
90 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
91 int64_t parentId; |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
92 if (transaction_.LookupParent(parentId, internalId)) |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
93 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
94 resource->SetParentIdentifier(transaction_.GetPublicId(parentId)); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
95 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
96 else |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
97 { |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
98 throw OrthancException(ErrorCode_InternalError); |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
99 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
100 } |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
101 |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
102 // TODO-FIND: Continue |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
103 |
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
104 response.Add(resource.release()); |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 else |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 throw OrthancException(ErrorCode_NotImplemented); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 /** |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 * Sanity checks |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 **/ |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 for (size_t i = 0; i < response.GetSize(); i++) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 { |
5589
b51ee994cd6f
renamed FindResponse::Item as FindResponse::Resource
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5586
diff
changeset
|
119 const FindResponse::Resource& resource = response.GetResource(i); |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 |
5592
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
121 if (request.IsRetrieveMainDicomTags()) |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 { |
5586
fc3914c07dd3
refactoring FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5583
diff
changeset
|
123 DicomMap tmp; |
5592
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
124 resource.GetMainDicomTags(tmp); |
5586
fc3914c07dd3
refactoring FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5583
diff
changeset
|
125 if (tmp.GetSize() == 0) |
fc3914c07dd3
refactoring FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5583
diff
changeset
|
126 { |
fc3914c07dd3
refactoring FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5583
diff
changeset
|
127 throw OrthancException(ErrorCode_InternalError); |
fc3914c07dd3
refactoring FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5583
diff
changeset
|
128 } |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
129 } |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
131 // TODO: other sanity checks |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 } |