Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.h @ 1002:b067017a8a5b lua-scripting
anonymization refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 04 Jul 2014 16:31:14 +0200 |
parents | 696dbb4fd390 |
children | a226e0959d8b |
comparison
equal
deleted
inserted
replaced
1001:f3929718ea7e | 1002:b067017a8a5b |
---|---|
52 class ServerIndexListener; | 52 class ServerIndexListener; |
53 } | 53 } |
54 | 54 |
55 class ServerIndex : public boost::noncopyable | 55 class ServerIndex : public boost::noncopyable |
56 { | 56 { |
57 public: | |
58 typedef std::list<FileInfo> Attachments; | |
59 typedef std::map< std::pair<ResourceType, MetadataType>, std::string> MetadataMap; | |
60 | |
57 private: | 61 private: |
58 class Transaction; | 62 class Transaction; |
59 struct UnstableResourcePayload; | 63 struct UnstableResourcePayload; |
60 | 64 |
61 bool done_; | 65 bool done_; |
96 /* out */ unsigned int& countSeries, | 100 /* out */ unsigned int& countSeries, |
97 /* out */ unsigned int& countInstances, | 101 /* out */ unsigned int& countInstances, |
98 /* in */ int64_t id, | 102 /* in */ int64_t id, |
99 /* in */ ResourceType type); | 103 /* in */ ResourceType type); |
100 | 104 |
105 StoreStatus Store(const DicomMap& dicomSummary, | |
106 const Attachments& attachments, | |
107 const std::string& remoteAet, | |
108 const MetadataMap* metadata); | |
109 | |
101 public: | 110 public: |
102 typedef std::list<FileInfo> Attachments; | |
103 | |
104 ServerIndex(ServerContext& context, | 111 ServerIndex(ServerContext& context, |
105 const std::string& dbPath); | 112 const std::string& dbPath); |
106 | 113 |
107 ~ServerIndex(); | 114 ~ServerIndex(); |
108 | 115 |
122 // "count == 0" means no limit on the number of patients | 129 // "count == 0" means no limit on the number of patients |
123 void SetMaximumPatientCount(unsigned int count); | 130 void SetMaximumPatientCount(unsigned int count); |
124 | 131 |
125 StoreStatus Store(const DicomMap& dicomSummary, | 132 StoreStatus Store(const DicomMap& dicomSummary, |
126 const Attachments& attachments, | 133 const Attachments& attachments, |
127 const std::string& remoteAet); | 134 const std::string& remoteAet) |
135 { | |
136 return Store(dicomSummary, attachments, remoteAet, NULL); | |
137 } | |
138 | |
139 StoreStatus Store(const DicomMap& dicomSummary, | |
140 const Attachments& attachments, | |
141 const std::string& remoteAet, | |
142 const MetadataMap& metadata) | |
143 { | |
144 return Store(dicomSummary, attachments, remoteAet, &metadata); | |
145 } | |
128 | 146 |
129 void ComputeStatistics(Json::Value& target); | 147 void ComputeStatistics(Json::Value& target); |
130 | 148 |
131 bool LookupResource(Json::Value& result, | 149 bool LookupResource(Json::Value& result, |
132 const std::string& publicId, | 150 const std::string& publicId, |
180 const std::string& publicId, | 198 const std::string& publicId, |
181 MetadataType type); | 199 MetadataType type); |
182 | 200 |
183 void ListAvailableMetadata(std::list<MetadataType>& target, | 201 void ListAvailableMetadata(std::list<MetadataType>& target, |
184 const std::string& publicId); | 202 const std::string& publicId); |
203 | |
204 bool GetMetadata(Json::Value& target, | |
205 const std::string& publicId); | |
185 | 206 |
186 void ListAvailableAttachments(std::list<FileContentType>& target, | 207 void ListAvailableAttachments(std::list<FileContentType>& target, |
187 const std::string& publicId, | 208 const std::string& publicId, |
188 ResourceType expectedType); | 209 ResourceType expectedType); |
189 | 210 |