Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestArchive.cpp @ 1315:0c735fed8953
ZIP archives now display the accession number of the studies
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 12 Feb 2015 13:28:47 +0100 |
parents | bba8a47922d1 |
children | 02f5a3f5c0a0 |
comparison
equal
deleted
inserted
replaced
1314:01be1432bda9 | 1315:0c735fed8953 |
---|---|
54 | 54 |
55 static std::string GetDirectoryNameInArchive(const Json::Value& resource, | 55 static std::string GetDirectoryNameInArchive(const Json::Value& resource, |
56 ResourceType resourceType) | 56 ResourceType resourceType) |
57 { | 57 { |
58 std::string s; | 58 std::string s; |
59 const Json::Value& tags = resource["MainDicomTags"]; | |
59 | 60 |
60 switch (resourceType) | 61 switch (resourceType) |
61 { | 62 { |
62 case ResourceType_Patient: | 63 case ResourceType_Patient: |
63 { | 64 { |
64 std::string p = resource["MainDicomTags"]["PatientID"].asString(); | 65 std::string p = tags["PatientID"].asString(); |
65 std::string n = resource["MainDicomTags"]["PatientName"].asString(); | 66 std::string n = tags["PatientName"].asString(); |
66 s = p + " " + n; | 67 s = p + " " + n; |
67 break; | 68 break; |
68 } | 69 } |
69 | 70 |
70 case ResourceType_Study: | 71 case ResourceType_Study: |
71 { | 72 { |
72 s = resource["MainDicomTags"]["StudyDescription"].asString(); | 73 std::string p; |
74 if (tags.isMember("AccessionNumber")) | |
75 { | |
76 p = tags["AccessionNumber"].asString() + " "; | |
77 } | |
78 | |
79 s = p + tags["StudyDescription"].asString(); | |
73 break; | 80 break; |
74 } | 81 } |
75 | 82 |
76 case ResourceType_Series: | 83 case ResourceType_Series: |
77 { | 84 { |
78 std::string d = resource["MainDicomTags"]["SeriesDescription"].asString(); | 85 std::string d = tags["SeriesDescription"].asString(); |
79 std::string m = resource["MainDicomTags"]["Modality"].asString(); | 86 std::string m = tags["Modality"].asString(); |
80 s = m + " " + d; | 87 s = m + " " + d; |
81 break; | 88 break; |
82 } | 89 } |
83 | 90 |
84 default: | 91 default: |