comparison OrthancServer/ServerIndex.h @ 200:9c58b2b03cf0

refactoring of read operations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Nov 2012 16:49:22 +0100
parents dfa2899d9960
children bee20e978835
comparison
equal deleted inserted replaced
199:dfa2899d9960 200:9c58b2b03cf0
63 Internals::SignalDeletedLevelFunction* deletedLevels_; 63 Internals::SignalDeletedLevelFunction* deletedLevels_;
64 64
65 void StoreMainDicomTags(const std::string& uuid, 65 void StoreMainDicomTags(const std::string& uuid,
66 const DicomMap& map); 66 const DicomMap& map);
67 67
68 bool GetMainDicomStringTag(std::string& result,
69 const std::string& uuid,
70 const DicomTag& tag);
71
72 bool GetMainDicomIntTag(int& result,
73 const std::string& uuid,
74 const DicomTag& tag);
75
76
77 bool HasPatient(DicomInstanceHasher& hasher); 68 bool HasPatient(DicomInstanceHasher& hasher);
78 69
79 void CreatePatient(DicomInstanceHasher& hasher, 70 void CreatePatient(DicomInstanceHasher& hasher,
80 const DicomMap& dicomSummary); 71 const DicomMap& dicomSummary);
81 72
101 void RecordChange(const std::string& resourceType, 92 void RecordChange(const std::string& resourceType,
102 const std::string& uuid); 93 const std::string& uuid);
103 94
104 void RemoveInstance(const std::string& uuid); 95 void RemoveInstance(const std::string& uuid);
105 96
106 void GetMainDicomTags(DicomMap& map,
107 const std::string& uuid);
108
109 void MainDicomTagsToJson(Json::Value& target,
110 const std::string& uuid);
111
112 void MainDicomTagsToJson2(Json::Value& result, 97 void MainDicomTagsToJson2(Json::Value& result,
113 int64_t resourceId); 98 int64_t resourceId);
114 99
115 bool DeleteInternal(Json::Value& target, 100 bool DeleteInternal(Json::Value& target,
116 const std::string& uuid, 101 const std::string& uuid,
125 bool LookupResource(Json::Value& result, 110 bool LookupResource(Json::Value& result,
126 const std::string& publicId, 111 const std::string& publicId,
127 ResourceType expectedType); 112 ResourceType expectedType);
128 113
129 SeriesStatus GetSeriesStatus(int id); 114 SeriesStatus GetSeriesStatus(int id);
130
131 SeriesStatus GetSeriesStatus(const std::string& seriesUuid);
132 115
133 public: 116 public:
134 ServerIndex(const std::string& storagePath); 117 ServerIndex(const std::string& storagePath);
135 118
136 StoreStatus Store(const DicomMap& dicomSummary, 119 StoreStatus Store(const DicomMap& dicomSummary,
148 131
149 uint64_t GetTotalCompressedSize(); 132 uint64_t GetTotalCompressedSize();
150 133
151 uint64_t GetTotalUncompressedSize(); 134 uint64_t GetTotalUncompressedSize();
152 135
153
154 bool GetInstance(Json::Value& result, 136 bool GetInstance(Json::Value& result,
155 const std::string& instanceUuid); 137 const std::string& instanceUuid)
138 {
139 return LookupResource(result, instanceUuid, ResourceType_Instance);
140 }
156 141
157 bool GetSeries(Json::Value& result, 142 bool GetSeries(Json::Value& result,
158 const std::string& seriesUuid); 143 const std::string& seriesUuid)
144 {
145 return LookupResource(result, seriesUuid, ResourceType_Series);
146 }
147
159 148
160 bool GetStudy(Json::Value& result, 149 bool GetStudy(Json::Value& result,
161 const std::string& studyUuid); 150 const std::string& studyUuid)
151 {
152 return LookupResource(result, studyUuid, ResourceType_Study);
153 }
154
162 155
163 bool GetPatient(Json::Value& result, 156 bool GetPatient(Json::Value& result,
164 const std::string& patientUuid); 157 const std::string& patientUuid)
158 {
159 return LookupResource(result, patientUuid, ResourceType_Patient);
160 }
165 161
166 bool GetFile(std::string& fileUuid, 162 bool GetFile(std::string& fileUuid,
167 CompressionType& compressionType, 163 CompressionType& compressionType,
168 const std::string& instanceUuid, 164 const std::string& instanceUuid,
169 AttachedFileType contentType); 165 AttachedFileType contentType);
197 193
198 bool GetChanges(Json::Value& target, 194 bool GetChanges(Json::Value& target,
199 int64_t since, 195 int64_t since,
200 const std::string& filter, 196 const std::string& filter,
201 unsigned int maxResults); 197 unsigned int maxResults);
202
203 /*bool GetAllInstances(std::list<std::string>& instancesUuid,
204 const std::string& uuid,
205 bool clear = true);*/
206 }; 198 };
207 } 199 }