comparison OrthancServer/OrthancFindRequestHandler.cpp @ 3025:039a9d262d64 db-changes

preparing to speed up find in databases
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 17 Dec 2018 17:05:28 +0100
parents 2cbafb5d5a62
children 5da6d1063d8f
comparison
equal deleted inserted replaced
3024:ef17a587e10d 3025:039a9d262d64
613 /** 613 /**
614 * Build up the query object. 614 * Build up the query object.
615 **/ 615 **/
616 616
617 LookupResource lookup(level); 617 LookupResource lookup(level);
618 DatabaseLookup lookup2;
618 619
619 bool caseSensitivePN; 620 bool caseSensitivePN;
620 621
621 { 622 {
622 OrthancConfiguration::ReaderLock lock; 623 OrthancConfiguration::ReaderLock lock;
653 { 654 {
654 sensitive = caseSensitivePN; 655 sensitive = caseSensitivePN;
655 } 656 }
656 657
657 lookup.AddDicomConstraint(tag, value, sensitive); 658 lookup.AddDicomConstraint(tag, value, sensitive);
659 lookup2.AddDicomConstraint(tag, value, sensitive, true /* mandatory */);
658 } 660 }
659 else 661 else
660 { 662 {
661 LOG(INFO) << "Because of a patch for the manufacturer of the remote modality, " 663 LOG(INFO) << "Because of a patch for the manufacturer of the remote modality, "
662 << "ignoring constraint on tag (" << tag.Format() << ") " << FromDcmtkBridge::GetTagName(element); 664 << "ignoring constraint on tag (" << tag.Format() << ") " << FromDcmtkBridge::GetTagName(element);
670 672
671 size_t limit = (level == ResourceType_Instance) ? maxInstances_ : maxResults_; 673 size_t limit = (level == ResourceType_Instance) ? maxInstances_ : maxResults_;
672 674
673 675
674 LookupVisitor visitor(answers, context_, level, *filteredInput, sequencesToReturn); 676 LookupVisitor visitor(answers, context_, level, *filteredInput, sequencesToReturn);
675 context_.Apply(visitor, lookup, 0 /* "since" is not relevant to C-FIND */, limit); 677 context_.Apply(visitor, lookup, lookup2, 0 /* "since" is not relevant to C-FIND */, limit);
676 } 678 }
677 679
678 680
679 void OrthancFindRequestHandler::FormatOrigin(Json::Value& origin, 681 void OrthancFindRequestHandler::FormatOrigin(Json::Value& origin,
680 const std::string& remoteIp, 682 const std::string& remoteIp,