# HG changeset patch # User Sebastien Jodogne # Date 1582714679 -3600 # Node ID 5331918773e7f33750c2483c685f32f33f02852d # Parent b7087f9280507eb279d97b06807001ec31df5575 Fix issue #154 (Matching against list of UID-s by C-MOVE) diff -r b7087f928050 -r 5331918773e7 NEWS --- a/NEWS Wed Feb 26 11:16:35 2020 +0100 +++ b/NEWS Wed Feb 26 11:57:59 2020 +0100 @@ -39,6 +39,7 @@ matching on some VRs, ignore main tags below the queried level * Fix issue #65 (Logging improvements) * Fix issue #140 (Modifying private tags with REST API changes VR from LO to UN) +* Fix issue #154 (Matching against list of UID-s by C-MOVE) * Fix issue #156 (Chunked Dicom-web transfer uses 100% CPU) * Fix issue #165 (Boundary parameter in multipart Content-Type is too long) * Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake) diff -r b7087f928050 -r 5331918773e7 OrthancServer/OrthancMoveRequestHandler.cpp --- a/OrthancServer/OrthancMoveRequestHandler.cpp Wed Feb 26 11:16:35 2020 +0100 +++ b/OrthancServer/OrthancMoveRequestHandler.cpp Wed Feb 26 11:57:59 2020 +0100 @@ -241,7 +241,24 @@ else { const std::string& content = value.GetContent(); - context_.GetIndex().LookupIdentifierExact(publicIds, level, tag, content); + + /** + * This tokenization fixes issue 154 ("Matching against list of + * UID-s by C-MOVE"). + * https://bitbucket.org/sjodogne/orthanc/issues/154/ + **/ + + std::vector tokens; + Toolbox::TokenizeString(tokens, content, '\\'); + for (size_t i = 0; i < tokens.size(); i++) + { + std::vector matches; + context_.GetIndex().LookupIdentifierExact(matches, level, tag, tokens[i]); + + // Concatenate "publicIds" with "matches" + publicIds.insert(publicIds.end(), matches.begin(), matches.end()); + } + return true; } }