changeset 1752:c3d8ec63a179 db-changes

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Oct 2015 17:45:05 +0100
parents fb569ee09a69
children faf2ecab3472
files OrthancServer/OrthancFindRequestHandler.cpp
diffstat 1 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancFindRequestHandler.cpp	Tue Oct 27 16:05:42 2015 +0100
+++ b/OrthancServer/OrthancFindRequestHandler.cpp	Tue Oct 27 17:45:05 2015 +0100
@@ -307,10 +307,17 @@
       }
 
 #if USE_LOOKUP_RESOURCE == 1
-      // TODO SetModalitiesInStudy(value);
-
-      finder.Add(tag, value, caseSensitivePN);
-
+      if (tag == DICOM_TAG_MODALITIES_IN_STUDY)
+      {
+        // TODO SetModalitiesInStudy(value);
+        // findQuery.SetModalitiesInStudy(value);
+        printf("ICI\n");
+        throw OrthancException(ErrorCode_NotImplemented);
+      }
+      else
+      {
+        finder.Add(tag, value, caseSensitivePN);
+      }
 #else
 
       if (tag == DICOM_TAG_MODALITIES_IN_STUDY)
@@ -353,6 +360,16 @@
 
 #if USE_LOOKUP_RESOURCE == 1
     bool finished = context_.Apply(tmp, finder);
+
+    for (std::list<std::string>::const_iterator
+        it = tmp.begin(); it != tmp.end(); ++it)
+    {
+      // TODO
+      Json::Value resource;
+      context_.ReadJson(resource, *it);
+      AddAnswer(answers, resource, query);
+    }
+
 #else
     bool finished = finder.Apply(tmp, findQuery);
 #endif