diff OrthancServer/Sources/Database/FindRequest.cpp @ 5590:8b32213af23e find-refactoring

replaced FindRequest::ResponseContent by booleans
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 03 May 2024 18:17:53 +0200
parents b0b5546f1b9f
children 1e2631b8b9af
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindRequest.cpp	Fri May 03 17:26:06 2024 +0200
+++ b/OrthancServer/Sources/Database/FindRequest.cpp	Fri May 03 18:17:53 2024 +0200
@@ -62,11 +62,16 @@
     hasLimits_(false),
     limitsSince_(0),
     limitsCount_(0),
-    responseContent_(ResponseContent_IdentifiersOnly),
     retrievePatientTags_(false),
     retrieveStudyTags_(false),
     retrieveSeriesTags_(false),
-    retrieveInstanceTags_(false)
+    retrieveInstanceTags_(false),
+    retrieveMetadata_(false),
+    retrieveLabels_(false),
+    retrieveAttachments_(false),
+    retrieveParentIdentifier_(false),
+    retrieveChildrenIdentifiers_(false),
+    retrieveChildrenMetadata_(false)
   {
   }
 
@@ -207,4 +212,42 @@
     ordering_.push_back(new Ordering(Key(metadataType), direction));
   }
 
+
+  void FindRequest::SetRetrieveParentIdentifier(bool retrieve)
+  {
+    if (level_ == ResourceType_Patient)
+    {
+      throw OrthancException(ErrorCode_BadParameterType);
+    }
+    else
+    {
+      retrieveParentIdentifier_ = retrieve;
+    }
+  }
+
+
+  void FindRequest::SetRetrieveChildrenIdentifiers(bool retrieve)
+  {
+    if (level_ == ResourceType_Instance)
+    {
+      throw OrthancException(ErrorCode_BadParameterType);
+    }
+    else
+    {
+      retrieveChildrenIdentifiers_ = retrieve;
+    }
+  }
+
+
+  void FindRequest::SetRetrieveChildrenMetadata(bool retrieve)
+  {
+    if (level_ == ResourceType_Instance)
+    {
+      throw OrthancException(ErrorCode_BadParameterType);
+    }
+    else
+    {
+      retrieveChildrenMetadata_ = retrieve;
+    }
+  }
 }