Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/Compatibility/GenericFind.h @ 5616:1e92fb051fd7 find-refactoring
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 09 May 2024 13:02:51 +0200 |
parents | 4640b7ae9a11 |
children | 3f13db27b399 |
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 #pragma once |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 #include "../IDatabaseWrapper.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 namespace Orthanc |
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 Compatibility |
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 class GenericFind : public boost::noncopyable |
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 private: |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 IDatabaseWrapper::ITransaction& transaction_; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
5596
81a29ad7fb4b
added possibility to retrieve main DICOM tags and metadata at any level
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5593
diff
changeset
|
36 void RetrieveMainDicomTags(FindResponse::Resource& target, |
81a29ad7fb4b
added possibility to retrieve main DICOM tags and metadata at any level
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5593
diff
changeset
|
37 ResourceType level, |
81a29ad7fb4b
added possibility to retrieve main DICOM tags and metadata at any level
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5593
diff
changeset
|
38 int64_t internalId); |
81a29ad7fb4b
added possibility to retrieve main DICOM tags and metadata at any level
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5593
diff
changeset
|
39 |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 public: |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 GenericFind(IDatabaseWrapper::ITransaction& transaction) : |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 transaction_(transaction) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 { |
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 |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
46 void ExecuteFind(std::list<std::string>& identifiers, |
5614
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
47 const FindRequest& request); |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
48 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
49 void ExecuteExpand(FindResponse& response, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
50 const FindRequest& request, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
51 const std::string& identifier); |
5554
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 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 } |