comparison OrthancServer/ServerIndex.cpp @ 1139:f167b672db94

/tools/lookup URI to map DICOM UIDs to Orthanc identifiers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Sep 2014 16:38:28 +0200
parents 514492f61ead
children ac36589f699e
comparison
equal deleted inserted replaced
1138:4c4fdee093de 1139:f167b672db94
1661 result.push_back(db_->GetPublicId(*it)); 1661 result.push_back(db_->GetPublicId(*it));
1662 } 1662 }
1663 } 1663 }
1664 1664
1665 1665
1666 void ServerIndex::LookupTagValue(std::list<std::string>& result, 1666 void ServerIndex::LookupTagValue(std::list< std::pair<ResourceType, std::string> >& result,
1667 const std::string& value) 1667 const std::string& value)
1668 { 1668 {
1669 result.clear(); 1669 result.clear();
1670 1670
1671 boost::mutex::scoped_lock lock(mutex_); 1671 boost::mutex::scoped_lock lock(mutex_);
1674 db_->LookupTagValue(id, value); 1674 db_->LookupTagValue(id, value);
1675 1675
1676 for (std::list<int64_t>::const_iterator 1676 for (std::list<int64_t>::const_iterator
1677 it = id.begin(); it != id.end(); ++it) 1677 it = id.begin(); it != id.end(); ++it)
1678 { 1678 {
1679 result.push_back(db_->GetPublicId(*it)); 1679 result.push_back(std::make_pair(db_->GetResourceType(*it),
1680 db_->GetPublicId(*it)));
1680 } 1681 }
1681 } 1682 }
1682 1683
1683 1684
1684 StoreStatus ServerIndex::AddAttachment(const FileInfo& attachment, 1685 StoreStatus ServerIndex::AddAttachment(const FileInfo& attachment,