Mercurial > hg > orthanc
diff OrthancServer/ServerIndex.cpp @ 1746:d143db00a794 db-changes
SetOfResources
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 26 Oct 2015 16:04:58 +0100 |
parents | b3de74dec2d5 |
children | ca69082ab200 |
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp Mon Oct 26 13:47:50 2015 +0100 +++ b/OrthancServer/ServerIndex.cpp Mon Oct 26 16:04:58 2015 +0100 @@ -45,6 +45,7 @@ #include "../Core/Logging.h" #include "../Core/Uuid.h" #include "../Core/DicomFormat/DicomArray.h" +#include "LookupIdentifierQuery.h" #include "FromDcmtkBridge.h" #include "ServerContext.h" @@ -1910,14 +1911,9 @@ boost::mutex::scoped_lock lock(mutex_); - std::list<int64_t> id; - db_.LookupIdentifierExact(id, level, tag, value); - - for (std::list<int64_t>::const_iterator - it = id.begin(); it != id.end(); ++it) - { - result.push_back(db_.GetPublicId(*it)); - } + LookupIdentifierQuery query(level); + query.AddConstraint(tag, IdentifierConstraintType_Equal, value); + query.Apply(result, db_); }