comparison OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp @ 5565:def06a42e5ef find-refactoring

Updated FindRequest & FindResponse definitions
author Alain Mazy <am@orthanc.team>
date Tue, 23 Apr 2024 13:07:38 +0200
parents 12d8a1a266e9
children b0b5546f1b9f
comparison
equal deleted inserted replaced
5554:12d8a1a266e9 5565:def06a42e5ef
236 236
237 #if 0 237 #if 0
238 // TODO - This version should be executed if no disk access is needed 238 // TODO - This version should be executed if no disk access is needed
239 if (expand) 239 if (expand)
240 { 240 {
241 request.SetResponseType(FindRequest::ResponseType_DicomMap); 241 request.SetResponseContent(FindRequest::ResponseContent_MainDicomTags |
242 request.SetMetadataMode(FindRequest::MetadataMode_Retrieve); 242 FindRequest::ResponseContent_Metadata |
243 FindRequest::ResponseContent_Labels |
244 FindRequest::ResponseContent_Attachments |
245 FindRequest::ResponseContent_Parent |
246 FindRequest::ResponseContent_Children)
247
243 request.SetRetrieveTagsAtLevel(resourceType, true); 248 request.SetRetrieveTagsAtLevel(resourceType, true);
244 249
245 if (resourceType == ResourceType_Study) 250 if (resourceType == ResourceType_Study)
246 { 251 {
247 request.SetRetrieveTagsAtLevel(ResourceType_Patient, true); 252 request.SetRetrieveTagsAtLevel(ResourceType_Patient, true);
248 } 253 }
249 } 254 }
250 else 255 else
251 { 256 {
252 request.SetResponseType(FindRequest::ResponseType_OrthancIdentifiers); 257 request.SetResponseContent(FindRequest::ResponseContent_IdentifiersOnly);
253 request.SetMetadataMode(FindRequest::MetadataMode_None);
254 } 258 }
255 #else 259 #else
256 request.SetResponseType(FindRequest::ResponseType_OrthancIdentifiers); 260 request.SetResponseContent(FindRequest::ResponseContent_IdentifiersOnly);
257 request.SetMetadataMode(FindRequest::MetadataMode_None);
258 #endif 261 #endif
259 262
260 if (call.HasArgument("limit") || 263 if (call.HasArgument("limit") ||
261 call.HasArgument("since")) 264 call.HasArgument("since"))
262 { 265 {