Mercurial > hg > orthanc
annotate OrthancServer/Sources/ExportedResource.cpp @ 4704:f0038043fb97 openssl-3.x
removed OpenSSL license exception, as OpenSSL 3.0 was relicensed under Apache 2.0
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Jun 2021 07:37:20 +0200 |
parents | d9473bd5ed43 |
children | 2e71a08eea15 |
rev | line source |
---|---|
1247 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1247
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium |
1247 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU General Public License as | |
9 * published by the Free Software Foundation, either version 3 of the | |
10 * License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
1624
0a2ad4a6858f
fix missing precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1288
diff
changeset
|
22 #include "PrecompiledHeadersServer.h" |
1247 | 23 #include "ExportedResource.h" |
24 | |
4045 | 25 #include "../../OrthancFramework/Sources/OrthancException.h" |
1247 | 26 |
27 namespace Orthanc | |
28 { | |
29 void ExportedResource::Format(Json::Value& item) const | |
30 { | |
31 item = Json::objectValue; | |
32 item["Seq"] = static_cast<int>(seq_); | |
33 item["ResourceType"] = EnumerationToString(resourceType_); | |
34 item["ID"] = publicId_; | |
35 item["Path"] = GetBasePath(resourceType_, publicId_); | |
36 item["RemoteModality"] = modality_; | |
37 item["Date"] = date_; | |
38 | |
39 // WARNING: Do not add "break" below and do not reorder the case items! | |
40 switch (resourceType_) | |
41 { | |
42 case ResourceType_Instance: | |
43 item["SOPInstanceUID"] = sopInstanceUid_; | |
44 | |
45 case ResourceType_Series: | |
46 item["SeriesInstanceUID"] = seriesInstanceUid_; | |
47 | |
48 case ResourceType_Study: | |
49 item["StudyInstanceUID"] = studyInstanceUid_; | |
50 | |
51 case ResourceType_Patient: | |
52 item["PatientID"] = patientId_; | |
53 break; | |
54 | |
55 default: | |
56 throw OrthancException(ErrorCode_InternalError); | |
57 } | |
58 } | |
59 } |