diff OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 1374:a1745d9be6e9

CaseSensitivePN configuration option
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 28 May 2015 15:30:42 +0200
parents 94ffb597d297
children 5c11c4e728eb d6971e18a324
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Wed May 27 10:50:59 2015 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Thu May 28 15:30:42 2015 +0200
@@ -859,7 +859,8 @@
         request.isMember("Level") &&
         request.isMember("Query") &&
         request["Level"].type() == Json::stringValue &&
-        request["Query"].type() == Json::objectValue)
+        request["Query"].type() == Json::objectValue &&
+        (!request.isMember("CaseSensitive") || request["CaseSensitive"].type() == Json::booleanValue))
     {
       bool expand = false;
       if (request.isMember("Expand"))
@@ -867,6 +868,12 @@
         expand = request["Expand"].asBool();
       }
 
+      bool caseSensitive = false;
+      if (request.isMember("CaseSensitive"))
+      {
+        caseSensitive = request["CaseSensitive"].asBool();
+      }
+
       std::string level = request["Level"].asString();
 
       DicomFindQuery query;
@@ -881,7 +888,8 @@
         }
 
         query.SetConstraint(FromDcmtkBridge::ParseTag(members[i]), 
-                            request["Query"][members[i]].asString());
+                            request["Query"][members[i]].asString(),
+                            caseSensitive);
       }
       
       std::list<std::string> resources;