Mercurial > hg > orthanc
annotate OrthancServer/ServerEnumerations.h @ 969:3dce528b0cc2
RestApiHierarchy
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Jun 2014 13:17:49 +0200 |
parents | 55dae8c5a6ab |
children | 649d47854314 |
rev | line source |
---|---|
183 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
689 | 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, |
183 | 4 * Belgium |
5 * | |
6 * This program is free software: you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation, either version 3 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * In addition, as a special exception, the copyright holders of this | |
12 * program give permission to link the code of its release with the | |
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
14 * that use the same license as the "OpenSSL" library), and distribute | |
15 * the linked executables. You must obey the GNU General Public License | |
16 * in all respects for all of the code used other than "OpenSSL". If you | |
17 * modify file(s) with this exception, you may extend this exception to | |
18 * your version of the file(s), but you are not obligated to do so. If | |
19 * you do not wish to do so, delete this exception statement from your | |
20 * version. If you delete this exception statement from all source files | |
21 * in the program, then also delete it here. | |
22 * | |
23 * This program is distributed in the hope that it will be useful, but | |
24 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
26 * General Public License for more details. | |
27 * | |
28 * You should have received a copy of the GNU General Public License | |
29 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
30 **/ | |
31 | |
32 #pragma once | |
33 | |
204 | 34 #include <string> |
35 | |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
559
diff
changeset
|
36 #include "../Core/Enumerations.h" |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
559
diff
changeset
|
37 |
183 | 38 namespace Orthanc |
39 { | |
40 enum SeriesStatus | |
41 { | |
42 SeriesStatus_Complete, | |
43 SeriesStatus_Missing, | |
44 SeriesStatus_Inconsistent, | |
45 SeriesStatus_Unknown | |
46 }; | |
47 | |
48 enum StoreStatus | |
49 { | |
50 StoreStatus_Success, | |
51 StoreStatus_AlreadyStored, | |
397
941ea46e9e26
lua filter of new instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
348
diff
changeset
|
52 StoreStatus_Failure, |
941ea46e9e26
lua filter of new instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
348
diff
changeset
|
53 StoreStatus_FilteredOut // Removed by NewInstanceFilter |
183 | 54 }; |
55 | |
519
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
56 enum ModalityManufacturer |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
57 { |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
58 ModalityManufacturer_Generic, |
665 | 59 ModalityManufacturer_ClearCanvas, |
732
b79eda29896d
dcm4chee manufacturer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
696
diff
changeset
|
60 ModalityManufacturer_MedInria, |
b79eda29896d
dcm4chee manufacturer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
696
diff
changeset
|
61 ModalityManufacturer_Dcm4Chee |
519
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
62 }; |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
63 |
620
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
64 enum DicomRequestType |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
65 { |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
66 DicomRequestType_Echo, |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
67 DicomRequestType_Find, |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
68 DicomRequestType_Get, |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
69 DicomRequestType_Move, |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
70 DicomRequestType_Store |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
71 }; |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
72 |
789 | 73 enum DicomReplaceMode |
74 { | |
75 DicomReplaceMode_InsertIfAbsent, | |
76 DicomReplaceMode_ThrowIfAbsent, | |
77 DicomReplaceMode_IgnoreIfAbsent | |
78 }; | |
79 | |
232
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
80 |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
81 /** |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
82 * WARNING: Do not change the explicit values in the enumerations |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
83 * below this point. This would result in incompatible databases |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
84 * between versions of Orthanc! |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
85 **/ |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
86 |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
87 enum GlobalProperty |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
88 { |
252 | 89 GlobalProperty_DatabaseSchemaVersion = 1, |
310 | 90 GlobalProperty_FlushSleep = 2, |
91 GlobalProperty_AnonymizationSequence = 3 | |
232
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
92 }; |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
93 |
183 | 94 enum MetadataType |
95 { | |
232
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
96 MetadataType_Instance_IndexInSeries = 1, |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
97 MetadataType_Instance_ReceptionDate = 2, |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
98 MetadataType_Instance_RemoteAet = 3, |
306
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
252
diff
changeset
|
99 MetadataType_Series_ExpectedNumberOfInstances = 4, |
311 | 100 MetadataType_ModifiedFrom = 5, |
432 | 101 MetadataType_AnonymizedFrom = 6, |
435
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
102 MetadataType_LastUpdate = 7, |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
103 |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
104 // Make sure that the value "65535" can be stored into this enumeration |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
105 MetadataType_StartUser = 1024, |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
106 MetadataType_EndUser = 65535 |
183 | 107 }; |
108 | |
109 enum ChangeType | |
110 { | |
111 ChangeType_CompletedSeries = 1, | |
232
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
112 ChangeType_NewInstance = 2, |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
113 ChangeType_NewPatient = 3, |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
221
diff
changeset
|
114 ChangeType_NewSeries = 4, |
315 | 115 ChangeType_NewStudy = 5, |
116 ChangeType_AnonymizedStudy = 6, | |
117 ChangeType_AnonymizedSeries = 7, | |
118 ChangeType_ModifiedStudy = 8, | |
348
1082e8121d10
refactoring anonymization/modification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
315
diff
changeset
|
119 ChangeType_ModifiedSeries = 9, |
1082e8121d10
refactoring anonymization/modification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
315
diff
changeset
|
120 ChangeType_AnonymizedPatient = 10, |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
437
diff
changeset
|
121 ChangeType_ModifiedPatient = 11, |
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
437
diff
changeset
|
122 ChangeType_StablePatient = 12, |
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
437
diff
changeset
|
123 ChangeType_StableStudy = 13, |
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
437
diff
changeset
|
124 ChangeType_StableSeries = 14 |
183 | 125 }; |
197
530a25320461
removal of text as ids in sqlite db
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
183
diff
changeset
|
126 |
435
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
127 void InitializeServerEnumerations(); |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
128 |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
129 void RegisterUserMetadata(int metadata, |
656 | 130 const std::string& name); |
435
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
131 |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
132 MetadataType StringToMetadata(const std::string& str); |
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
133 |
437 | 134 std::string EnumerationToString(MetadataType type); |
435
28ba73274919
registration of user-defined metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
434
diff
changeset
|
135 |
696
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
136 void RegisterUserContentType(int contentType, |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
137 const std::string& name); |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
138 |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
139 FileContentType StringToContentType(const std::string& str); |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
140 |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
141 std::string EnumerationToString(FileContentType type); |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
142 |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
143 std::string GetBasePath(ResourceType type, |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
144 const std::string& publicId); |
4c1860179cc5
dictionary of user-defined content types
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
145 |
434
ccf3a0a43dac
EnumerationDictionary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
432
diff
changeset
|
146 const char* EnumerationToString(SeriesStatus status); |
204 | 147 |
434
ccf3a0a43dac
EnumerationDictionary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
432
diff
changeset
|
148 const char* EnumerationToString(StoreStatus status); |
216
e5d5d4a9a326
refactored upload of dicom through http
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
206
diff
changeset
|
149 |
434
ccf3a0a43dac
EnumerationDictionary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
432
diff
changeset
|
150 const char* EnumerationToString(ChangeType type); |
250
f23318b11b39
creation of zip files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
232
diff
changeset
|
151 |
519
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
152 const char* EnumerationToString(ModalityManufacturer manufacturer); |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
153 |
620
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
154 const char* EnumerationToString(DicomRequestType type); |
4aa6f0d79947
security filter for dicom requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
562
diff
changeset
|
155 |
519
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
156 ModalityManufacturer StringToModalityManufacturer(const std::string& manufacturer); |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
511
diff
changeset
|
157 |
250
f23318b11b39
creation of zip files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
232
diff
changeset
|
158 ResourceType GetParentResourceType(ResourceType type); |
f23318b11b39
creation of zip files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
232
diff
changeset
|
159 |
f23318b11b39
creation of zip files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
232
diff
changeset
|
160 ResourceType GetChildResourceType(ResourceType type); |
183 | 161 } |