Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5679:527918e9c5d9 find-refactoring
integration mainline->find-refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Jul 2024 09:03:40 +0200 |
parents | dc96401dbe88 e47ac5e133b1 |
children | 77875b51cf95 |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Mon Jul 08 19:03:23 2024 +0200 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Tue Jul 09 09:03:40 2024 +0200 @@ -364,38 +364,6 @@ } - void StatelessDatabaseOperations::NormalizeLookup(std::vector<DatabaseConstraint>& target, - const DatabaseLookup& source, - ResourceType queryLevel) const - { - assert(mainDicomTagsRegistry_.get() != NULL); - - target.clear(); - target.reserve(source.GetConstraintsCount()); - - for (size_t i = 0; i < source.GetConstraintsCount(); i++) - { - ResourceType level; - DicomTagType type; - - mainDicomTagsRegistry_->LookupTag(level, type, source.GetConstraint(i).GetTag()); - - if (type == DicomTagType_Identifier || - type == DicomTagType_Main) - { - // Use the fact that patient-level tags are copied at the study level - if (level == ResourceType_Patient && - queryLevel != ResourceType_Patient) - { - level = ResourceType_Study; - } - - target.push_back(source.GetConstraint(i).ConvertToDatabaseConstraint(level, type)); - } - } - } - - class StatelessDatabaseOperations::Transaction : public boost::noncopyable { private: @@ -1929,7 +1897,9 @@ } std::vector<DatabaseConstraint> normalized; - NormalizeLookup(normalized, lookup, queryLevel); + + assert(mainDicomTagsRegistry_.get() != NULL); + mainDicomTagsRegistry_->NormalizeLookup(normalized, lookup, queryLevel); Operations operations; operations.Apply(*this, (instancesId != NULL), normalized, queryLevel, labels, labelsConstraint, limit);