Mercurial > hg > orthanc
diff OrthancServer/Search/LookupResource.cpp @ 1754:3a4f7dc00f49 db-changes
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Oct 2015 11:31:58 +0100 |
parents | faf2ecab3472 |
children | 39c37a994b2f |
line wrap: on
line diff
--- a/OrthancServer/Search/LookupResource.cpp Tue Oct 27 20:31:34 2015 +0100 +++ b/OrthancServer/Search/LookupResource.cpp Wed Oct 28 11:31:58 2015 +0100 @@ -315,7 +315,17 @@ void LookupResource::FindCandidates(std::list<int64_t>& result, IDatabaseWrapper& database) const { - SetOfResources candidates(database, level_); + ResourceType startingLevel; + if (level_ == ResourceType_Patient) + { + startingLevel = ResourceType_Patient; + } + else + { + startingLevel = ResourceType_Study; + } + + SetOfResources candidates(database, startingLevel); switch (level_) {