diff 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
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Mon Apr 15 16:13:24 2024 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Tue Apr 23 13:07:38 2024 +0200
@@ -238,8 +238,13 @@
       // TODO - This version should be executed if no disk access is needed
       if (expand)
       {
-        request.SetResponseType(FindRequest::ResponseType_DicomMap);
-        request.SetMetadataMode(FindRequest::MetadataMode_Retrieve);
+        request.SetResponseContent(FindRequest::ResponseContent_MainDicomTags |
+                                   FindRequest::ResponseContent_Metadata |
+                                   FindRequest::ResponseContent_Labels |
+                                   FindRequest::ResponseContent_Attachments |
+                                   FindRequest::ResponseContent_Parent |
+                                   FindRequest::ResponseContent_Children)
+
         request.SetRetrieveTagsAtLevel(resourceType, true);
 
         if (resourceType == ResourceType_Study)
@@ -249,12 +254,10 @@
       }
       else
       {
-        request.SetResponseType(FindRequest::ResponseType_OrthancIdentifiers);
-        request.SetMetadataMode(FindRequest::MetadataMode_None);
+        request.SetResponseContent(FindRequest::ResponseContent_IdentifiersOnly);
       }
 #else
-      request.SetResponseType(FindRequest::ResponseType_OrthancIdentifiers);
-      request.SetMetadataMode(FindRequest::MetadataMode_None);
+      request.SetResponseContent(FindRequest::ResponseContent_IdentifiersOnly);
 #endif
 
       if (call.HasArgument("limit") ||