Mercurial > hg > orthanc
comparison OrthancServer/DatabaseWrapperBase.cpp @ 1760:51db4a25a741 db-changes
LookupIdentifier is plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Oct 2015 11:09:00 +0100 |
parents | 318c2e83c2bd |
children | f4286d99ee0a |
comparison
equal
deleted
inserted
replaced
1759:e268412adcf1 | 1760:51db4a25a741 |
---|---|
679 return s.Step(); | 679 return s.Step(); |
680 } | 680 } |
681 | 681 |
682 | 682 |
683 | 683 |
684 /** | |
685 | |
686 TODO REMOVE THIS | |
687 | |
688 void DatabaseWrapperBase::LookupIdentifierExact(std::list<int64_t>& target, | |
689 ResourceType level, | |
690 const DicomTag& tag, | |
691 const std::string& value) | |
692 { | |
693 assert((level == ResourceType_Patient && tag == DICOM_TAG_PATIENT_ID) || | |
694 (level == ResourceType_Study && tag == DICOM_TAG_STUDY_INSTANCE_UID) || | |
695 (level == ResourceType_Study && tag == DICOM_TAG_ACCESSION_NUMBER) || | |
696 (level == ResourceType_Series && tag == DICOM_TAG_SERIES_INSTANCE_UID) || | |
697 (level == ResourceType_Instance && tag == DICOM_TAG_SOP_INSTANCE_UID)); | |
698 | |
699 SQLite::Statement s(db_, SQLITE_FROM_HERE, | |
700 "SELECT d.id FROM DicomIdentifiers AS d, Resources AS r WHERE " | |
701 "d.id = r.internalId AND r.resourceType=? AND d.tagGroup=? AND d.tagElement=? AND d.value=?"); | |
702 | |
703 s.BindInt(0, level); | |
704 s.BindInt(1, tag.GetGroup()); | |
705 s.BindInt(2, tag.GetElement()); | |
706 s.BindString(3, value); | |
707 | |
708 target.clear(); | |
709 | |
710 while (s.Step()) | |
711 { | |
712 target.push_back(s.ColumnInt64(0)); | |
713 } | |
714 } | |
715 */ | |
716 | |
717 | |
718 | |
719 void DatabaseWrapperBase::LookupIdentifier(std::list<int64_t>& target, | 684 void DatabaseWrapperBase::LookupIdentifier(std::list<int64_t>& target, |
720 ResourceType level, | 685 ResourceType level, |
721 const DicomTag& tag, | 686 const DicomTag& tag, |
722 IdentifierConstraintType type, | 687 IdentifierConstraintType type, |
723 const std::string& value) | 688 const std::string& value) |