# HG changeset patch # User Sebastien Jodogne # Date 1449855557 -3600 # Node ID 74dc6b764ff000afa3fe8feb0a9c17ef74cdb1d1 # Parent 444f0bdaba01a1af74ec16eaa79a2ae078baadc1 Fix modality worklists lookups if tags with UN (unknown) VR are present diff -r 444f0bdaba01 -r 74dc6b764ff0 NEWS --- a/NEWS Fri Dec 11 16:42:26 2015 +0100 +++ b/NEWS Fri Dec 11 18:39:17 2015 +0100 @@ -5,6 +5,7 @@ * Fix of DICOMDIR generation with DCMTK 3.6.1, support of encodings * New function in plugin SDK: "OrthancPluginSendMultipartItem2()" * Fix range search if the lower or upper limit is absent +* Fix modality worklists lookups if tags with UN (unknown) VR are present Version 0.9.6 (2015/12/08) diff -r 444f0bdaba01 -r 74dc6b764ff0 OrthancServer/Search/HierarchicalMatcher.cpp --- a/OrthancServer/Search/HierarchicalMatcher.cpp Fri Dec 11 16:42:26 2015 +0100 +++ b/OrthancServer/Search/HierarchicalMatcher.cpp Fri Dec 11 18:39:17 2015 +0100 @@ -33,6 +33,7 @@ #include "../PrecompiledHeadersServer.h" #include "HierarchicalMatcher.h" +#include "../../Core/Logging.h" #include "../../Core/OrthancException.h" #include "../FromDcmtkBridge.h" #include "../ToDcmtkBridge.h" @@ -125,7 +126,14 @@ if (value->IsBinary()) { - throw OrthancException(ErrorCode_BadRequest); + if (!value->GetContent().empty()) + { + LOG(WARNING) << "This C-Find modality worklist query contains a non-empty tag (" + << tag.Format() << ") with UN (unknown) value representation. " + << "It will be ignored."; + } + + constraints_[tag] = NULL; } else if (value->IsNull() || value->GetContent().empty()) diff -r 444f0bdaba01 -r 74dc6b764ff0 Plugins/Samples/ModalityWorklists/Plugin.cpp --- a/Plugins/Samples/ModalityWorklists/Plugin.cpp Fri Dec 11 16:42:26 2015 +0100 +++ b/Plugins/Samples/ModalityWorklists/Plugin.cpp Fri Dec 11 18:39:17 2015 +0100 @@ -131,8 +131,11 @@ return OrthancPluginErrorCode_InternalError; } - std::cout << "Received worklist query from remote modality " << remoteAet - << ":" << std::endl << json.toStyledString(); + { + std::string msg = ("Received worklist query from remote modality " + + std::string(remoteAet) + ":\n" + json.toStyledString()); + OrthancPluginLogInfo(context_, msg.c_str()); + } boost::filesystem::path source(folder_); boost::filesystem::directory_iterator end;