Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/OrthancIdentifiers.h @ 5554:12d8a1a266e9 find-refactoring
introduction of FindRequest and FindResponse
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Apr 2024 16:13:24 +0200 |
parents | |
children | 3f13db27b399 |
comparison
equal
deleted
inserted
replaced
5549:dcbf0c776945 | 5554:12d8a1a266e9 |
---|---|
1 /** | |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium | |
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
7 * | |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU General Public License as | |
10 * published by the Free Software Foundation, either version 3 of the | |
11 * License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 #pragma once | |
24 | |
25 #include "../../../OrthancFramework/Sources/Compatibility.h" | |
26 #include "../../../OrthancFramework/Sources/Enumerations.h" | |
27 | |
28 #include <boost/noncopyable.hpp> | |
29 #include <string> | |
30 | |
31 | |
32 namespace Orthanc | |
33 { | |
34 class OrthancIdentifiers : public boost::noncopyable | |
35 { | |
36 private: | |
37 std::unique_ptr<std::string> patientId_; | |
38 std::unique_ptr<std::string> studyId_; | |
39 std::unique_ptr<std::string> seriesId_; | |
40 std::unique_ptr<std::string> instanceId_; | |
41 | |
42 public: | |
43 OrthancIdentifiers() | |
44 { | |
45 } | |
46 | |
47 OrthancIdentifiers(const OrthancIdentifiers& other); | |
48 | |
49 void SetPatientId(const std::string& id); | |
50 | |
51 bool HasPatientId() const | |
52 { | |
53 return patientId_.get() != NULL; | |
54 } | |
55 | |
56 const std::string& GetPatientId() const; | |
57 | |
58 void SetStudyId(const std::string& id); | |
59 | |
60 bool HasStudyId() const | |
61 { | |
62 return studyId_.get() != NULL; | |
63 } | |
64 | |
65 const std::string& GetStudyId() const; | |
66 | |
67 void SetSeriesId(const std::string& id); | |
68 | |
69 bool HasSeriesId() const | |
70 { | |
71 return seriesId_.get() != NULL; | |
72 } | |
73 | |
74 const std::string& GetSeriesId() const; | |
75 | |
76 void SetInstanceId(const std::string& id); | |
77 | |
78 bool HasInstanceId() const | |
79 { | |
80 return instanceId_.get() != NULL; | |
81 } | |
82 | |
83 const std::string& GetInstanceId() const; | |
84 | |
85 ResourceType DetectLevel() const; | |
86 | |
87 void SetLevel(ResourceType level, | |
88 const std::string id); | |
89 | |
90 std::string GetLevel(ResourceType level) const; | |
91 }; | |
92 } |